# HG changeset patch # User Bram Moolenaar # Date 1570737603 -7200 # Node ID c67268c0398e4ecf728b147877584852d1d8eea8 # Parent 3321c870ae6f4e86447ae3cf1730698e5148918d patch 8.1.2135: with modifyOtherKeys Alt-a does not work properly Commit: https://github.com/vim/vim/commit/00eab7f128ecfef699fec30988e5b1cc72378617 Author: Bram Moolenaar Date: Thu Oct 10 21:49:28 2019 +0200 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2135, +/**/ 2134, /**/ 2133,