]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0178: DEC mode requests are sent even when not in raw mode v9.2.0178
authorFoxe Chen <chen.foxe@gmail.com>
Mon, 16 Mar 2026 21:25:10 +0000 (21:25 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 16 Mar 2026 21:25:10 +0000 (21:25 +0000)
Problem:  Vim sends DEC mode query requests (DECRQM) regardless of the
          terminal mode.
Solution: Only send DEC mode requests when cur_tmode is TMODE_RAW, but
          e.g not for gui mode (Foxe Chen).

fixes:  #19709
closes: #19710

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

index 2b9c854801b100f67c5b2f62c7bfef12f3ba1550..43cc9988cb32fc61d0d3bb7f5ce5c184f069371e 100644 (file)
@@ -4051,11 +4051,14 @@ starttermcap(void)
        out_str(T_FE);
 #endif
 
-    // Request setting of relevant DEC modes via DECRQM
-    for (int i = 0; i < (int)ARRAY_LENGTH(dec_modes); i++)
+    if (cur_tmode == TMODE_RAW)
     {
-       vim_snprintf((char *)IObuff, IOSIZE, "\033[?%d$p", dec_modes[i]);
-       out_str(IObuff);
+       // Request setting of relevant DEC modes via DECRQM
+       for (int i = 0; i < (int)ARRAY_LENGTH(dec_modes); i++)
+       {
+           vim_snprintf((char *)IObuff, IOSIZE, "\033[?%d$p", dec_modes[i]);
+           out_str(IObuff);
+       }
     }
 
     out_flush();
index 15d8a4d695b8f021abc823429e8521e060451c1e..d8b677a37f1663bb50ee3113f63cdcb53e68ae5b 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    178,
 /**/
     177,
 /**/