diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-10 21:49:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-10 21:49:28 +0200 |
commit | 00eab7f128ecfef699fec30988e5b1cc72378617 (patch) | |
tree | e2ccde53b1aaf1383f0a76f98628c7f374e4be17 /src/getchar.c | |
parent | 6a0299d8f4c7a64c64d60a6bb39cfe6eaf892247 (diff) | |
download | vim-git-00eab7f128ecfef699fec30988e5b1cc72378617.tar.gz |
patch 8.1.2135: with modifyOtherKeys Alt-a does not work properlyv8.1.2135
Problem: With modifyOtherKeys Alt-a does not work properly.
Solution: Remove the ALT modifier. Get multi-byte after applying ALT.
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/getchar.c b/src/getchar.c index ecd6bdcd0..0e4e3c315 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1733,25 +1733,6 @@ vgetc(void) case K_XRIGHT: c = K_RIGHT; break; } - if (!no_reduce_keys) - { - // A modifier was not used for a mapping, apply it to ASCII - // keys. - if ((mod_mask & MOD_MASK_CTRL) - && ((c >= '`' && c <= 0x7f) - || (c >= '@' && c <= '_'))) - { - c &= 0x1f; - mod_mask &= ~MOD_MASK_CTRL; - } - if ((mod_mask & (MOD_MASK_META | MOD_MASK_ALT)) - && c >= 0 && c <= 127) - { - c += 0x80; - mod_mask &= ~MOD_MASK_META; - } - } - // For a multi-byte character get all the bytes and return the // converted character. // Note: This will loop until enough bytes are received! @@ -1787,6 +1768,25 @@ vgetc(void) c = (*mb_ptr2char)(buf); } + if (!no_reduce_keys) + { + // A modifier was not used for a mapping, apply it to ASCII + // keys. + if ((mod_mask & MOD_MASK_CTRL) + && ((c >= '`' && c <= 0x7f) + || (c >= '@' && c <= '_'))) + { + c &= 0x1f; + mod_mask &= ~MOD_MASK_CTRL; + } + if ((mod_mask & (MOD_MASK_META | MOD_MASK_ALT)) + && c >= 0 && c <= 127) + { + c += 0x80; + mod_mask &= ~(MOD_MASK_META|MOD_MASK_ALT); + } + } + break; } } |