]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0264: Cannot disable kitty keyboard protocol in vim :terminal v9.2.0264
authorJulio B <julio.bacel@gmail.com>
Sat, 28 Mar 2026 10:01:38 +0000 (10:01 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 28 Mar 2026 10:01:38 +0000 (10:01 +0000)
Problem:  Cannot disable kitty keyboard protocol in vim :terminal
Solution: Handle "CSI <u" sequence in libvterm (Julio B).

related: v9.0.0930
closes: #19837

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/libvterm/src/state.c
src/testdir/test_terminal.vim
src/version.c

index aff97b076893e2ac0ddf5fa5c3e631909378dd49..fca833326ef39242a592e02ed428e589e878a7d6 100644 (file)
@@ -983,6 +983,7 @@ static int on_csi(const char *leader, const long args[], int argcount, const cha
     switch(leader[0]) {
     case '?':
     case '>':
+    case '<':
       leader_byte = leader[0];
       break;
     default:
index 1097b06c7d728b104303ff12840144a2c41fdc17..6f8fb36626f60c2ed669d0a71137a8b9bcd5b736 100644 (file)
@@ -2441,4 +2441,14 @@ func Test_term_TextChangedT_close()
   augroup END
 endfunc
 
+func Test_terminal_disable_kitty_keyboard()
+  CheckRunVimInTerminal
+  let cmd = ['sh', '-c', 'printf ''\033[>1u\033[?u\033[<u\033[?u''; sleep 1']
+  let buf = term_start(cmd)
+  let job = term_getjob(buf)
+  call WaitForAssert({-> assert_equal('dead', job_status(job))})
+  call WaitForAssert({-> assert_equal('^[[?1u^[[?0u', term_getline(buf, 1))})
+  bwipe!
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
index 500dfc864a513ab223aeb99948270472d0eed136..c63416ee56c89a470bc0ef9feeaf5b826923e850 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    264,
 /**/
     263,
 /**/