From: Bram Moolenaar Date: Thu, 10 Oct 2019 19:49:28 +0000 (+0200) Subject: patch 8.1.2135: with modifyOtherKeys Alt-a does not work properly X-Git-Tag: v8.1.2135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00eab7f128ecfef699fec30988e5b1cc72378617;p=vim patch 8.1.2135: with modifyOtherKeys Alt-a does not work properly Problem: With modifyOtherKeys Alt-a does not work properly. Solution: Remove the ALT modifier. Get multi-byte after applying ALT. --- 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; } } diff --git a/src/version.c b/src/version.c index 7289c9bb6..f22db5547 100644 --- a/src/version.c +++ b/src/version.c @@ -753,6 +753,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2135, /**/ 2134, /**/