ardagnir / pterosaur

All firefox text fields are vim.
GNU Affero General Public License v3.0
772 stars 30 forks source link

ESC during change commands deselects text area #36

Open jeaye opened 9 years ago

jeaye commented 9 years ago

I've found that using escape to cancel commands (not related to VimFx) such a changing inside text objects ends up deselecting the text area.

Given text: (foo bar spam)

Typing, in normal mode where the cursor is on, say, b: ci<ESC>

Ends up, instead of cancelling the change, deselecting the text area.

jeaye commented 9 years ago

I don't believe this is a duplicate; please reopen it. The issue is that I believe pterosaur should keep track of whether or not the user is currently building a motion command when handling an escape press. If escape is pressed in the middle of such a command, the command should be cancelled and the user should stay in normal mode.

ardagnir commented 9 years ago

I'm reopening, but this is low priority.