{"action":"created","issue":{"url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/359","repository_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit","labels_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/359/comments","events_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/359/events","html_url":"https://github.com/jonathanslenders/python-prompt-toolkit/issues/359","id":167230230,"number":359,"title":"Unable to enter a single-digit -ve argument","user":{"login":"haridsv","id":166486,"avatar_url":"https://avatars.githubusercontent.com/u/166486?v=3","gravatar_id":"","url":"https://api.github.com/users/haridsv","html_url":"https://github.com/haridsv","followers_url":"https://api.github.com/users/haridsv/followers","following_url":"https://api.github.com/users/haridsv/following{/other_user}","gists_url":"https://api.github.com/users/haridsv/gists{/gist_id}","starred_url":"https://api.github.com/users/haridsv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haridsv/subscriptions","organizations_url":"https://api.github.com/users/haridsv/orgs","repos_url":"https://api.github.com/users/haridsv/repos","events_url":"https://api.github.com/users/haridsv/events{/privacy}","received_events_url":"https://api.github.com/users/haridsv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-24T11:56:36Z","updated_at":"2016-07-24T13:02:53Z","closed_at":null,"body":"In readline, to enter a -ve argument, you start with `<Esc>` followed by `-`, which immediately defaults to `-1` as the argument (`(arg: -1)`), but as soon as you enter a digit, say `5`, the argument changes to `-5` (`(arg: -5)`). The same sequence in prompt-toolkit results in an argument of `-15` with no way to enter `-5` as argument."},"comment":{"url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/comments/234776162","html_url":"https://github.com/jonathanslenders/python-prompt-toolkit/issues/359#issuecomment-234776162","issue_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/359","id":234776162,"user":{"login":"haridsv","id":166486,"avatar_url":"https://avatars.githubusercontent.com/u/166486?v=3","gravatar_id":"","url":"https://api.github.com/users/haridsv","html_url":"https://github.com/haridsv","followers_url":"https://api.github.com/users/haridsv/followers","following_url":"https://api.github.com/users/haridsv/following{/other_user}","gists_url":"https://api.github.com/users/haridsv/gists{/gist_id}","starred_url":"https://api.github.com/users/haridsv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haridsv/subscriptions","organizations_url":"https://api.github.com/users/haridsv/orgs","repos_url":"https://api.github.com/users/haridsv/repos","events_url":"https://api.github.com/users/haridsv/events{/privacy}","received_events_url":"https://api.github.com/users/haridsv/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T13:02:53Z","updated_at":"2016-07-24T13:02:53Z","body":"Actually, there is more to this, if we really want to emulate closely with readline. In readline, once you start entering an argument, you no longer have to keep `Alt` pressed, so it basically enters into a different mode (like a search mode) that continues consuming digits. This can however be addressed as a separate feature and is also backwards incompatible, in case some prompt-toolkit applications already started relying on this lack of distinct mode."}}
{"actor":{"display_login":"haridsv"}}