To: vim_dev@googlegroups.com Subject: Patch 9.0.1063 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1063 Problem: When using Kitty a shell command may mess up the key protocol state. Solution: Output t_te before t_TE. If t_te switches between the main and the alternate screen then deactivating the key protocol by t_TE should happen after switching screen. (issue #11705) Files: src/term.c *** ../vim-9.0.1062/src/term.c 2022-12-03 10:13:26.322949264 +0000 --- src/term.c 2022-12-16 12:40:48.302735625 +0000 *************** *** 3891,3900 **** out_str(T_KE); // stop "keypad transmit" mode out_flush(); termcap_active = FALSE; cursor_on(); // just in case it is still off out_str_t_TE(); // stop "raw" mode, modifyOtherKeys and // Kitty keyboard protocol - out_str(T_TE); // stop termcap mode screen_start(); // don't know where cursor is now out_flush(); } --- 3891,3903 ---- out_str(T_KE); // stop "keypad transmit" mode out_flush(); termcap_active = FALSE; + + // Output t_te first, it may switch between main and alternate screen, + // and following codes may work on the active screen only. + out_str(T_TE); // stop termcap mode cursor_on(); // just in case it is still off out_str_t_TE(); // stop "raw" mode, modifyOtherKeys and // Kitty keyboard protocol screen_start(); // don't know where cursor is now out_flush(); } *** ../vim-9.0.1062/src/version.c 2022-12-15 13:48:25.594876357 +0000 --- src/version.c 2022-12-16 12:43:12.902786964 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1063, /**/ -- Luxury. We used to have to get out of the lake at three o'clock in the morning, clean the lake, eat a handful of hot gravel, go to work at the mill every day for tuppence a month, come home, and Dad would beat us around the head and neck with a broken bottle, if we were LUCKY! /// 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 ///