]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0631: DECRQM and SGR Mouse not supported in foot terminal v9.2.0631
authorFoxe Chen <chen.foxe@gmail.com>
Sat, 13 Jun 2026 17:36:01 +0000 (17:36 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 13 Jun 2026 17:36:01 +0000 (17:36 +0000)
Problem:  DECRQM and SGR Mouse not supported in foot terminal
Solution: Explicitly enable those features when running in a foot
          terminal (Foxe Chen)

closes: #20503

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/term.c
src/version.c

index 19d287223b00ca16c434db5973a5cd1db972195a..dcb9c92442ec18b2d9183978776094f2f5083b64 100644 (file)
@@ -5274,6 +5274,13 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
            term_props[TPR_DECRQM].tpr_status = TPR_YES;
        }
 
+       // foot terminal sends 1;12700;0
+       if (arg[0] == 1 && version == 12700 && arg[2] == 0)
+       {
+           term_props[TPR_MOUSE].tpr_status = TPR_MOUSE_SGR;
+           term_props[TPR_DECRQM].tpr_status = TPR_YES;
+       }
+
        // GNU screen sends 83;30600;0, 83;40500;0, etc.
        // 30600/40500 is a version number of GNU screen. DA2 support is added
        // on 3.6.  DCS string has a special meaning to GNU screen, but xterm
index 7f2591dfe148c4d204f52311a4a1d706af312833..fbf3f5a3fec03a7ad5fd0332333f3de2f9f4629e 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    631,
 /**/
     630,
 /**/