patch 9.2.0178: DEC mode requests are sent even when not in raw mode

Commit: 
https://github.com/vim/vim/commit/d737e2443744b69f74006104158b4e6e3eceb095
Author: Foxe Chen <[email protected]>
Date:   Mon Mar 16 21:25:10 2026 +0000

    patch 9.2.0178: DEC mode requests are sent even when not in raw mode
    
    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/term.c b/src/term.c
index 2b9c85480..43cc9988c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -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, " [?%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, " [?%d$p", dec_modes[i]);
+           out_str(IObuff);
+       }
     }
 
     out_flush();
diff --git a/src/version.c b/src/version.c
index 15d8a4d69..d8b677a37 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    178,
 /**/
     177,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1w2FVk-008uD8-HF%40256bit.org.

Raspunde prin e-mail lui