{"action":"created","issue":{"url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1001","labels_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1001/labels{/name}","comments_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1001/comments","events_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1001/events","html_url":"https://github.com/SublimeTextIssues/Core/issues/1001","id":107871133,"number":1001,"title":"ESC from selection moves cursor to the end of file","user":{"login":"KES777","id":799021,"avatar_url":"https://avatars.githubusercontent.com/u/799021?v=3","gravatar_id":"","url":"https://api.github.com/users/KES777","html_url":"https://github.com/KES777","followers_url":"https://api.github.com/users/KES777/followers","following_url":"https://api.github.com/users/KES777/following{/other_user}","gists_url":"https://api.github.com/users/KES777/gists{/gist_id}","starred_url":"https://api.github.com/users/KES777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KES777/subscriptions","organizations_url":"https://api.github.com/users/KES777/orgs","repos_url":"https://api.github.com/users/KES777/repos","events_url":"https://api.github.com/users/KES777/events{/privacy}","received_events_url":"https://api.github.com/users/KES777/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SublimeTextIssues/Core/labels/R:%20invalid","name":"R: invalid","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-23T08:22:10Z","updated_at":"2015-09-24T08:54:51Z","closed_at":"2015-09-23T15:42:41Z","body":"How to reproduce:\r\n1. CTRL+A\r\n2. ESC\r\n\r\nAfter this you will be moved to the end of file.\r\nActually press ESC moves you to the current cursor position (I think this is handly)\r\n\r\nBut pressing ESC when there is selected text I expect the selection would be canceled and cursor moves to position it were before the selection occour"},"comment":{"url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/comments/142861200","html_url":"https://github.com/SublimeTextIssues/Core/issues/1001#issuecomment-142861200","issue_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1001","id":142861200,"user":{"login":"KES777","id":799021,"avatar_url":"https://avatars.githubusercontent.com/u/799021?v=3","gravatar_id":"","url":"https://api.github.com/users/KES777","html_url":"https://github.com/KES777","followers_url":"https://api.github.com/users/KES777/followers","following_url":"https://api.github.com/users/KES777/following{/other_user}","gists_url":"https://api.github.com/users/KES777/gists{/gist_id}","starred_url":"https://api.github.com/users/KES777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KES777/subscriptions","organizations_url":"https://api.github.com/users/KES777/orgs","repos_url":"https://api.github.com/users/KES777/repos","events_url":"https://api.github.com/users/KES777/events{/privacy}","received_events_url":"https://api.github.com/users/KES777/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T08:54:51Z","updated_at":"2015-09-24T08:54:51Z","body":"NO, I have no such package:\r\n```\r\n{\r\n\t\"bootstrapped\": true,\r\n\t\"in_process_packages\":\r\n\t[\r\n\t],\r\n\t\"installed_packages\":\r\n\t[\r\n\t\t\"Alignment\",\r\n\t\t\"All Autocomplete\",\r\n\t\t\"ApplySyntax\",\r\n\t\t\"BracketHighlighter\",\r\n\t\t\"Color Highlighter\",\r\n\t\t\"ColorPicker\",\r\n\t\t\"ColorSchemeEditor\",\r\n\t\t\"DocBlockr\",\r\n\t\t\"EditorConfig\",\r\n\t\t\"Emmet\",\r\n\t\t\"EncodingHelper\",\r\n\t\t\"FileDiffs\",\r\n\t\t\"Floobits\",\r\n\t\t\"Git\",\r\n\t\t\"GitGutter\",\r\n\t\t\"MarkdownEditing\",\r\n\t\t\"Modific\",\r\n\t\t\"Package Control\",\r\n\t\t\"PerlTidy\",\r\n\t\t\"PlainTasks\",\r\n\t\t\"rsub\",\r\n\t\t\"Ruby Debugger\",\r\n\t\t\"SideBarEnhancements\",\r\n\t\t\"SideBarGit\",\r\n\t\t\"SmartMarkdown\",\r\n\t\t\"SublimeCodeIntel\",\r\n\t\t\"SublimeGit\",\r\n\t\t\"SublimeLinter\",\r\n\t\t\"SublimeLinter-contrib-perl\",\r\n\t\t\"SublimeLinter-contrib-perlcritic\",\r\n\t\t\"Terminal\",\r\n\t\t\"Theme - Soda\",\r\n\t\t\"Theme - Sodarized\",\r\n\t\t\"Theme - Spacegray\",\r\n\t\t\"TrailingSpaces\",\r\n\t\t\"Xdebug Client\"\r\n\t]\r\n}\r\n```\r\n\r\nThank you, I am workaround for that:\r\n```\r\n    { \"keys\": [\"escape\"], \"command\": \"soft_undo\", \"context\":\r\n        [\r\n            { \"key\": \"selection_empty\", \"operator\": \"equal\", \"operand\": false }\r\n        ]\r\n    },\r\n```\r\n\r\nBut this does not work (((\r\n```\r\n    { \"keys\": [\"escape\"], \"command\": \"soft_undo\", \"context\":\r\n        [\r\n            { \"key\": \"num_selections\", \"operator\": \"equal\", \"operand\": 0 }\r\n        ]\r\n    },\r\n```\r\nIs it because of `view.run_command('num_selections')` returns 'None'?\r\n"}}