banacorn / agda-mode

agda-mode on Atom
https://atom.io/packages/agda-mode
MIT License
58 stars 14 forks source link

Input method gets stuck if text cursor is moved #94

Closed rwe closed 5 years ago

rwe commented 5 years ago

It would be great if the input mode could abort on Esc and if the cursor is manually repositioned.

There are currently (0.8.10) two related problems.

If you start the input mode (like \ x ) and then click elsewhere, input mode will never recover without clicking one of the toolbar buttons or moving the cursor back to its original position.

If you're using vim-mode-plus, then the toolbar gets stuck open all the time, because the vim "Normal" mode (for moving the cursor) is entered by pressing Esc. I'd expect this to abort the input mode, but it doesn't. So if you press Esc while entering an agda character, you have to then re-enter insertion mode, press Space or something to flush agda-mode's character, and then press Esc to go back to Normal mode as you originally intended.

rwe commented 5 years ago

Reading through the issues, this is probably also related to this: #71

banacorn commented 5 years ago

Thank you for reporting this! Now the input method should deactivate when:

  1. Esc got pressed
  2. cursor is out of range

This patch will come with the next big-big-everything-got-rewritten release, so it might take a little bit longer.