To: vim_dev@googlegroups.com Subject: Patch 9.0.0940 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0940 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) Files: src/terminal.c, src/testdir/test_termcodes.vim *** ../vim-9.0.0939/src/terminal.c 2022-11-24 00:08:58.465010528 +0000 --- src/terminal.c 2022-11-24 13:32:50.554077467 +0000 *************** *** 1590,1596 **** // 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) && mod == (VTERM_MOD_CTRL | VTERM_MOD_SHIFT)) c = TOLOWER_ASC(c); --- 1590,1596 ---- // 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(vterm) && mod == (VTERM_MOD_CTRL | VTERM_MOD_SHIFT)) c = TOLOWER_ASC(c); *** ../vim-9.0.0939/src/testdir/test_termcodes.vim 2022-11-17 22:05:08.602034256 +0000 --- src/testdir/test_termcodes.vim 2022-11-24 14:02:50.898175071 +0000 *************** *** 2156,2161 **** --- 2156,2164 ---- endfunc func Test_CSIu_keys_without_modifiers() + " make this execute faster + set timeoutlen=10 + " Escape sent as `CSI 27 u` should act as normal escape and not undo call setline(1, 'a') call feedkeys('a' .. GetEscCodeCSIuWithoutModifier("\e"), 'Lx!') *************** *** 2166,2171 **** --- 2169,2176 ---- call setline(1, '') call feedkeys('a' .. GetEscCodeCSIuWithoutModifier("\t") .. "\", 'Lx!') call assert_equal("\t", getline(1)) + + set timeoutlen& endfunc " Check that when DEC mouse codes are recognized a special key is handled. *** ../vim-9.0.0939/src/version.c 2022-11-24 13:27:32.389881082 +0000 --- src/version.c 2022-11-24 13:34:55.969970839 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 940, /**/ -- All true wisdom is found on T-shirts. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///