hlissner / evil-snipe

2-char searching ala vim-sneak & vim-seek, for evil-mode
MIT License
340 stars 25 forks source link

Use read-key instead of read-event #42

Closed wbolster closed 8 years ago

wbolster commented 8 years ago

By using the higher level function read-key instead of the lower level read-event, translation keymaps such as key-translation-map are taken into account, which allows sniping for the intended characters, i.e. after translation.

Since read-key doesn't return special symbols but characters, adapt the tests for tab, enter, escape, and backspace.

While at it, use cl-incf for consistency with the code nearby.

wbolster commented 8 years ago

actually i think (evil-read-key) would be even better for consistency with other evil char prompts.

hlissner commented 8 years ago

I don't remember why I switched to read-event. Thanks for the fix!