Mercurial > vim
comparison src/term.c @ 31461:79701601ba55 v9.0.1063
patch 9.0.1063: when using Kitty a shell command may mess up the key state
Commit: https://github.com/vim/vim/commit/4ab1f4a32f7e0fcafa8f542429f1f6c47dcd5d2c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 16 13:08:36 2022 +0000
patch 9.0.1063: when using Kitty a shell command may mess up the key state
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Dec 2022 14:15:03 +0100 |
parents | ab527a32a5d8 |
children | d9263e7a0570 |
comparison
equal
deleted
inserted
replaced
31460:0a5992bd6a1e | 31461:79701601ba55 |
---|---|
3889 | 3889 |
3890 out_str(T_BD); // disable bracketed paste mode | 3890 out_str(T_BD); // disable bracketed paste mode |
3891 out_str(T_KE); // stop "keypad transmit" mode | 3891 out_str(T_KE); // stop "keypad transmit" mode |
3892 out_flush(); | 3892 out_flush(); |
3893 termcap_active = FALSE; | 3893 termcap_active = FALSE; |
3894 | |
3895 // Output t_te first, it may switch between main and alternate screen, | |
3896 // and following codes may work on the active screen only. | |
3897 out_str(T_TE); // stop termcap mode | |
3894 cursor_on(); // just in case it is still off | 3898 cursor_on(); // just in case it is still off |
3895 out_str_t_TE(); // stop "raw" mode, modifyOtherKeys and | 3899 out_str_t_TE(); // stop "raw" mode, modifyOtherKeys and |
3896 // Kitty keyboard protocol | 3900 // Kitty keyboard protocol |
3897 out_str(T_TE); // stop termcap mode | |
3898 screen_start(); // don't know where cursor is now | 3901 screen_start(); // don't know where cursor is now |
3899 out_flush(); | 3902 out_flush(); |
3900 } | 3903 } |
3901 } | 3904 } |
3902 | 3905 |