patch 9.0.0940: crash when typing a letter in a terminal window
Problem: Crash when typing a letter in a terminal window. (Shane-XB-Qian)
Solution: Use the "vterm" variable instead of getting the terminal pointer
from the current buffer. (closes #11608)
diff --git a/src/terminal.c b/src/terminal.c
index d0cdd45..bc36317 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -1590,7 +1590,7 @@
// Ctrl-Shift-i may have the key "I" instead of "i", but for the kitty
// keyboard protocol should use "i". Applies to all ascii letters.
if (ASCII_ISUPPER(c)
- && vterm_is_kitty_keyboard(curbuf->b_term->tl_vterm)
+ && vterm_is_kitty_keyboard(vterm)
&& mod == (VTERM_MOD_CTRL | VTERM_MOD_SHIFT))
c = TOLOWER_ASC(c);