]> git.gir.st - VimFx.git/commit
Only apply `vimfx.addKeyOverrides` in Normal mode
authorSimon Lydell <simon.lydell@gmail.com>
Wed, 21 Sep 2016 15:47:14 +0000 (17:47 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Wed, 21 Sep 2016 15:53:08 +0000 (17:53 +0200)
commit6ab3e85c039f1e58c9765dc07f5d4542e2f8f5c8
treedf7aea9667d76e1b737dc7a2c57e283417577d91
parentfe46fb15284de6987aeb82aa126f0858ac933977
Only apply `vimfx.addKeyOverrides` in Normal mode

Previously, the key overrides were applied in _all_ modes, and the
current mode name was passed as the second argument to the matching
functions. However, it was way to easy to forget to also check the mode
in the matching functions (even the documentation forgot to!). For
example, if you added `j` as an override for some page, you then
couldn't press `j` in Hints mode to match a hint marker.

This commit fixes this problem by simply _only_ applying the key
overrides in Normal mode. I can't think of any use cases for wanting key
overrides in any other mode.

This is technically a minor breaking API change.

Fixes #812.
documentation/api.md
extension/lib/api.coffee
extension/test/test-api.coffee
Imprint / Impressum