diff options
| author | Michael Forney <mforney@mforney.org> | 2017-02-06 09:58:42 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-02-06 10:09:42 -0800 |
| commit | d97c8cc3cf9b64c680f4ae933354adc19e50dde2 (patch) | |
| tree | 1d2a42d8fef275f3885827d32ebb686c373210f2 /main.c | |
| parent | 2464589156b1c75a883b6320328c3479a95dc6ae (diff) | |
| download | vis-d97c8cc3cf9b64c680f4ae933354adc19e50dde2.tar.gz vis-d97c8cc3cf9b64c680f4ae933354adc19e50dde2.tar.xz | |
Disable keymap for movement_key character
The character following a movement_key command should not be subject to
keymap translation since it is used to find characters in the document.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1716,9 +1716,14 @@ static const char *operator_filter(Vis *vis, const char *keys, const Arg *arg) { } static const char *movement_key(Vis *vis, const char *keys, const Arg *arg) { + if (!keys[0]) { + vis_keymap_disable(vis); + return NULL; + } + char key[32]; const char *next; - if (!keys[0] || !(next = vis_keys_next(vis, keys))) + if (!(next = vis_keys_next(vis, keys))) return NULL; size_t len = next - keys; if (len < sizeof key) { |
