Mercurial > vim
diff src/misc2.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 | 238ca27dbfd2 |
children | 03188d05289a |
line wrap: on
line diff
--- a/src/misc2.c +++ b/src/misc2.c @@ -1498,6 +1498,7 @@ find_special_key( key = DEL; } else if (key == 27 + && (flags & FSK_FROM_PART) != 0 && (kitty_protocol_state == KKPS_ENABLED || kitty_protocol_state == KKPS_DISABLED)) { @@ -1506,7 +1507,10 @@ find_special_key( // character and set did_simplify, then in the // non-simplified keys use K_ESC. if ((flags & FSK_SIMPLIFY) != 0) - *did_simplify = TRUE; + { + if (did_simplify != NULL) + *did_simplify = TRUE; + } else key = K_ESC; }