diff src/term.c @ 31734:59c474f6715d v9.0.1199

patch 9.0.1199: crash when using kitty and using a mapping with <Esc> Commit: https://github.com/vim/vim/commit/584b853ee034754edd278d15f2966ac3d8c9d72c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 14 21:07:07 2023 +0000 patch 9.0.1199: crash when using kitty and using a mapping with <Esc> Problem: Crash when using kitty and using a mapping with <Esc>. Solution: Do not try setting did_simplify when it is NULL. (closes https://github.com/vim/vim/issues/11817)
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 Jan 2023 22:15:03 +0100
parents c55341fea626
children 1e21d10ceb58
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -6636,8 +6636,10 @@ replace_termcodes(
 		}
 	    }
 #endif
-	    slen = trans_special(&src, result + dlen, FSK_KEYCODE
-			  | ((flags & REPTERM_NO_SIMPLIFY) ? 0 : FSK_SIMPLIFY),
+	    int fsk_flags = FSK_KEYCODE
+			| ((flags & REPTERM_NO_SIMPLIFY) ? 0 : FSK_SIMPLIFY)
+			| ((flags & REPTERM_FROM_PART) ? FSK_FROM_PART : 0);
+	    slen = trans_special(&src, result + dlen, fsk_flags,
 							   TRUE, did_simplify);
 	    if (slen > 0)
 	    {