changeset 18281:c67268c0398e v8.1.2135

patch 8.1.2135: with modifyOtherKeys Alt-a does not work properly Commit: https://github.com/vim/vim/commit/00eab7f128ecfef699fec30988e5b1cc72378617 Author: Bram Moolenaar <Bram@vim.org> 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Oct 2019 22:00:03 +0200
parents 3321c870ae6f
children e0cbdb1aeca0
files src/getchar.c src/version.c
diffstat 2 files changed, 21 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	}
     }
--- 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,