diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-21 14:17:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-21 14:17:24 +0100 |
commit | 4bc85f23ed2cf1fab20597ff15cefa675ea5e2c6 (patch) | |
tree | 31ecb2d1c475e02f8808b29316c47d0f4feab3f9 /src/testdir/test_termcodes.vim | |
parent | 7fa02bcb3b8011961995e617423a6f8f531b6e4d (diff) |
patch 9.0.0813: Kitty terminal is not recognizedv9.0.0813
Problem: Kitty terminal is not recognized.
Solution: Recognize Kitty by the termresponse and then do not set
seenModifyOtherKeys, since Kitty doesn't support that.
(issue #11413)
Diffstat (limited to 'src/testdir/test_termcodes.vim')
-rw-r--r-- | src/testdir/test_termcodes.vim | 54 |
1 files changed, 44 insertions, 10 deletions
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim index 92bd4cd75b..5bcc191024 100644 --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -1647,7 +1647,8 @@ func Test_xx01_term_style_response() \ cursor_style: 'u', \ cursor_blink_mode: 'u', \ underline_rgb: 'u', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) set t_RV= @@ -1681,7 +1682,8 @@ func Test_xx02_iTerm2_response() \ cursor_style: 'n', \ cursor_blink_mode: 'u', \ underline_rgb: 'u', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) set t_RV= @@ -1700,7 +1702,8 @@ func Run_libvterm_konsole_response(code) \ cursor_style: 'n', \ cursor_blink_mode: 'u', \ underline_rgb: 'u', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) endfunc @@ -1742,7 +1745,8 @@ func Test_xx04_Mac_Terminal_response() \ cursor_style: 'n', \ cursor_blink_mode: 'u', \ underline_rgb: 'y', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) call assert_equal("\<Esc>[58;2;%lu;%lu;%lum", &t_8u) @@ -1772,7 +1776,8 @@ func Test_xx05_mintty_response() \ cursor_style: 'n', \ cursor_blink_mode: 'u', \ underline_rgb: 'y', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) set t_RV= @@ -1807,7 +1812,8 @@ func Test_xx06_screen_response() \ cursor_style: 'n', \ cursor_blink_mode: 'n', \ underline_rgb: 'y', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) set t_RV= @@ -1831,7 +1837,8 @@ func Do_check_t_8u_set_reset(set_by_user) \ cursor_style: 'u', \ cursor_blink_mode: 'u', \ underline_rgb: 'u', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) call assert_equal(a:set_by_user ? default_value : '', &t_8u) endfunc @@ -1867,7 +1874,8 @@ func Test_xx07_xterm_response() \ cursor_style: 'n', \ cursor_blink_mode: 'u', \ underline_rgb: 'y', - \ mouse: 'u' + \ mouse: 'u', + \ kitty: 'u', \ }, terminalprops()) " xterm >= 95 < 277 "xterm2" @@ -1882,7 +1890,8 @@ func Test_xx07_xterm_response() \ cursor_style: 'n', \ cursor_blink_mode: 'u', \ underline_rgb: 'u', - \ mouse: '2' + \ mouse: '2', + \ kitty: 'u', \ }, terminalprops()) " xterm >= 277: "sgr" @@ -1897,7 +1906,8 @@ func Test_xx07_xterm_response() \ cursor_style: 'n', \ cursor_blink_mode: 'u', \ underline_rgb: 'u', - \ mouse: 's' + \ mouse: 's', + \ kitty: 'u', \ }, terminalprops()) " xterm >= 279: "sgr" and cursor_style not reset; also check t_8u reset, @@ -1909,6 +1919,30 @@ func Test_xx07_xterm_response() call test_override('term_props', 0) endfunc +func Test_xx08_kitty_response() + " Termresponse is only parsed when t_RV is not empty. + set t_RV=x + call test_override('term_props', 1) + + set ttymouse=xterm + call test_option_not_set('ttymouse') + let seq = "\<Esc>[>1;4001;12c" + call feedkeys(seq, 'Lx!') + call assert_equal(seq, v:termresponse) + call assert_equal('sgr', &ttymouse) + + call assert_equal(#{ + \ cursor_style: 'u', + \ cursor_blink_mode: 'u', + \ underline_rgb: 'y', + \ mouse: 's', + \ kitty: 'y', + \ }, terminalprops()) + + set t_RV= + call test_override('term_props', 0) +endfunc + func Test_focus_events() let save_term = &term let save_ttymouse = &ttymouse |