[vim/vim] "pp" shown at the beginning of the buffer when opening a new file (Issue #19852)

59 views
Skip to first unread message

Dorian Marié

unread,
Mar 28, 2026, 10:34:40 AMMar 28
to vim/vim, Subscribed
dorianmariecom created an issue (vim/vim#19852)

Steps to reproduce

  1. have vim 9.2 installed (via brew)
  2. run vim -u DEFAULTS --noplugin /tmp/test
  3. see pp at the beginning of the buffer

Expected behaviour

empty file instead of "pp"

Version of Vim

9.2.250

Environment

operating system: macos tahoe 26.3.1
terminal: terminal.app Version 2.15 (466)
~> echo $TERM
xterm-256color
i use fish version 4.6.0

Screenshot.2026-03-28.at.15.32.01.png (view on web)

downgrading to 9.1 solved it

Logs and stack traces

chdir(/tmp)
fchdir() to previous dir
chdir(/Users/dorianmariefr)
fchdir() to previous dir
sourcing "/Users/dorianmariefr/.vimrc"
chdir(/Users/dorianmariefr/.vim/autoload)
fchdir() to previous dir
line 24: sourcing "/Users/dorianmariefr/.vim/autoload/plug.vim"
finished sourcing /Users/dorianmariefr/.vim/autoload/plug.vim
continuing in /Users/dorianmariefr/.vimrc
chdir(/opt/homebrew/share/vim/vim92)
fchdir() to previous dir
line 83: sourcing "/opt/homebrew/share/vim/vim92/filetype.vim"
not found in 'runtimepath': "ftdetect/*.vim"
finished sourcing /opt/homebrew/share/vim/vim92/filetype.vim
continuing in plug#end
chdir(/opt/homebrew/share/vim/vim92)
fchdir() to previous dir
line 83: sourcing "/opt/homebrew/share/vim/vim92/ftplugin.vim"
finished sourcing /opt/homebrew/share/vim/vim92/ftplugin.vim
continuing in plug#end
chdir(/opt/homebrew/share/vim/vim92)
fchdir() to previous dir
line 83: sourcing "/opt/homebrew/share/vim/vim92/indent.vim"
finished sourcing /opt/homebrew/share/vim/vim92/indent.vim
continuing in plug#end
chdir(/opt/homebrew/share/vim/vim92/syntax)
fchdir() to previous dir
line 86: sourcing "/opt/homebrew/share/vim/vim92/syntax/syntax.vim"
chdir(/opt/homebrew/share/vim/vim92/syntax)
fchdir() to previous dir
line 20: sourcing "/opt/homebrew/share/vim/vim92/syntax/synload.vim"
chdir(/opt/homebrew/share/vim/vim92/syntax)
fchdir() to previous dir
line 22: sourcing "/opt/homebrew/share/vim/vim92/syntax/syncolor.vim"
chdir(/opt/homebrew/share/vim/vim92/colors/lists)
fchdir() to previous dir
line 57: sourcing "/opt/homebrew/share/vim/vim92/colors/lists/default.vim"
finished sourcing /opt/homebrew/share/vim/vim92/colors/lists/default.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/syncolor.vim
finished sourcing /opt/homebrew/share/vim/vim92/syntax/syncolor.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/synload.vim
finished sourcing /opt/homebrew/share/vim/vim92/syntax/synload.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/syntax.vim
Executing FileType Autocommands for "*"
autocommand 0verbose exe "set syntax=" . expand("<amatch>")

finished sourcing /opt/homebrew/share/vim/vim92/syntax/syntax.vim
continuing in plug#end
chdir(/opt/homebrew/share/vim/vim92/syntax)
fchdir() to previous dir
line 27: sourcing "/opt/homebrew/share/vim/vim92/syntax/syntax.vim"
chdir(/opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax)
fchdir() to previous dir
line 16: sourcing "/opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/nosyntax.vim"
Executing BufEnter Autocommands for "*"
autocommand syn clear

autocommand if exists("b:current_syntax") | unlet b:current_syntax | endif

finished sourcing /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/nosyntax.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/syntax.vim
chdir(/opt/homebrew/share/vim/vim92/syntax)
fchdir() to previous dir
line 20: sourcing "/opt/homebrew/share/vim/vim92/syntax/synload.vim"
chdir(/opt/homebrew/share/vim/vim92/syntax)
fchdir() to previous dir
line 22: sourcing "/opt/homebrew/share/vim/vim92/syntax/syncolor.vim"
finished sourcing /opt/homebrew/share/vim/vim92/syntax/syncolor.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/synload.vim
finished sourcing /opt/homebrew/share/vim/vim92/syntax/synload.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/syntax/syntax.vim
Executing FileType Autocommands for "*"
autocommand 0verbose exe "set syntax=" . expand("<amatch>")

finished sourcing /opt/homebrew/share/vim/vim92/syntax/syntax.vim
continuing in /Users/dorianmariefr/.vimrc
finished sourcing /Users/dorianmariefr/.vimrc
not found in 'packpath': "pack/*/start/*"
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/getscriptPlugin.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/getscriptPlugin.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/gzip.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/gzip.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/logiPat.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/logiPat.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/manpager.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/manpager.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/matchparen.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/matchparen.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/netrwPlugin.vim"
not found in 'packpath': "pack/*/start/netrw"
chdir(/opt/homebrew/share/vim/vim92)
fchdir() to previous dir
chdir(/Users/dorianmariefr/.vim)
fchdir() to previous dir
chdir(/opt/homebrew/share/vim/vimfiles)
fchdir() to previous dir
chdir(/opt/homebrew/share/vim/vim92)
fchdir() to previous dir
chdir(/opt/homebrew/share/vim/vim92/pack/dist/opt)
fchdir() to previous dir
chdir(/opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/pack/dist/opt/netrw/plugin)
fchdir() to previous dir
line 7: sourcing "/opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/pack/dist/opt/netrw/plugin/netrwPlugin.vim"
finished sourcing /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/pack/dist/opt/netrw/plugin/netrwPlugin.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/plugin/netrwPlugin.vim
finished sourcing /opt/homebrew/share/vim/vim92/plugin/netrwPlugin.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/openPlugin.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/openPlugin.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/rrhelper.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/rrhelper.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/spellfile.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/spellfile.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/tarPlugin.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/tarPlugin.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/tohtml.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/tohtml.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/tutor.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/tutor.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/vimballPlugin.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/vimballPlugin.vim
chdir(/opt/homebrew/share/vim/vim92/plugin)
fchdir() to previous dir
sourcing "/opt/homebrew/share/vim/vim92/plugin/zipPlugin.vim"
finished sourcing /opt/homebrew/share/vim/vim92/plugin/zipPlugin.vim
not found in 'packpath': "pack/*/start/*"
not found in 'runtimepath': "plugin/**/*.vim"
Reading viminfo file "/Users/dorianmariefr/.viminfo" info oldfiles
"/tmp/test" [New]
Reading viminfo file "/Users/dorianmariefr/.viminfo" marks
Executing BufNewFile Autocommands for "*"
autocommand call dist#ft#DetectFromName()

chdir(/opt/homebrew/share/vim/vim92/autoload/dist)
fchdir() to previous dir
line 0: sourcing "/opt/homebrew/share/vim/vim92/autoload/dist/ft.vim"
finished sourcing /opt/homebrew/share/vim/vim92/autoload/dist/ft.vim
continuing in BufNewFile Autocommands for "*"
Executing BufNewFile Autocommands for "*"
autocommand call dist#ft#DetectFromExt()

autocommand if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat | runtime! scripts.vim | endif

chdir(/opt/homebrew/share/vim/vim92)
fchdir() to previous dir
line 0: sourcing "/opt/homebrew/share/vim/vim92/scripts.vim"
chdir(/opt/homebrew/share/vim/vim92/autoload/dist)
fchdir() to previous dir
line 27: sourcing "/opt/homebrew/share/vim/vim92/autoload/dist/script.vim"
finished sourcing /opt/homebrew/share/vim/vim92/autoload/dist/script.vim
continuing in /opt/homebrew/Cellar/vim/9.2.0200/share/vim/vim92/scripts.vim
finished sourcing /opt/homebrew/share/vim/vim92/scripts.vim
continuing in BufNewFile Autocommands for "*"
Executing BufNewFile Autocommands for "*"
autocommand if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat    && (expand("<amatch>") =~# '\.conf$'^I|| getline(1) =~ '^#' || getline(2) =~ '^#'^I|| getline(3) =~ '^#' || getline(4) =~ '^#'^I|| getline(5) =~ '^#') |   setf FALLBACK conf | endif

Executing BufWinEnter Autocommands for "*"
autocommand autocmd SafeState * ++once call s:Highlight_Matching_Pair()

Executing BufEnter Autocommands for "*"
autocommand sil call s:LocalBrowse(expand("<amatch>"))

Executing VimEnter Autocommands for "*"
autocommand sil call s:VimEnter(expand("<amatch>"))

Executing CursorMoved Autocommands for "*"
autocommand call s:Highlight_Matching_Pair()

Executing SafeState Autocommands for "*"
autocommand call s:Highlight_Matching_Pair()


Writing viminfo file "/Users/dorianmariefr/.viminfo"


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852@github.com>

xiote

unread,
Mar 28, 2026, 4:17:00 PMMar 28
to vim/vim, Subscribed
xiote left a comment (vim/vim#19852)

me to

  • Vim: 9.2.250 (Homebrew, /opt/homebrew/bin/vim)
  • OS: macOS Tahoe (Darwin 25.4.0), Apple Silicon (arm64), version 26.4(25E246)
  • Terminal: Apple Terminal.app (TERM=xterm-256color), version 2.15(470)
  • Shell: zsh

Reproduced with:

  • vim --clean
  • vim -u DEFAULTS --noplugin
  • TERM=screen-256color vim --clean
  • TERM=nsterm-256color vim --clean

Only TERM=dumb avoids the issue.

-w capture shows two KE_OSC (0x80 0xfd 0x6d) events injected at startup.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4148740917@github.com>

julio-b

unread,
Mar 28, 2026, 8:02:04 PMMar 28
to vim/vim, Subscribed
julio-b left a comment (vim/vim#19852)

I can reproduce on FreeBSD 15.0 console

Screenshot_freebsd15.0.png (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4149062824@github.com>

Foxe Chen

unread,
Mar 28, 2026, 8:05:59 PMMar 28
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19852)

Did this start happening recently? If so, can you possibly try using git bisect to find the bad commit? Thanks


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4149070176@github.com>

julio-b

unread,
Mar 28, 2026, 8:11:39 PMMar 28
to vim/vim, Subscribed
julio-b left a comment (vim/vim#19852)

bisected to v9.2.0200 (1da42ee)
Reverting this commit fixes the issue for me.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4149078956@github.com>

Foxe Chen

unread,
Mar 28, 2026, 9:40:39 PMMar 28
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19852)

bisected to v9.2.0200 (1da42ee) Reverting this commit fixes the issue for me.

does this patch fix your issue?

diff --git a/src/main.c b/src/main.c
index b5f542a49..a0d1aa6a0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -873,6 +873,11 @@ vim_main2(void)

     // Must come before the may_req_ calls.
     starting = 0;
+
+    // Same reason for termresponse, don't want the terminal sending out the
+    // DECRPM response after Vim has exited. Might also put characters on the
+    // screen, so do it before redrawing.
+    send_decrqm_modes();

 # if defined(FEAT_TERMRESPONSE)
     // Must be done before redrawing, puts a few characters on the screen.
@@ -893,9 +898,6 @@ vim_main2(void)

     may_req_bg_color();
 # endif
-    // Same reason for termresponse, don't want the terminal sending out the
-    // DECRPM response after Vim has exited.
-    send_decrqm_modes();

     // start in insert mode
     if (p_im)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4149199789@github.com>

julio-b

unread,
Mar 29, 2026, 2:17:23 PMMar 29
to vim/vim, Subscribed
julio-b left a comment (vim/vim#19852)

does this patch fix your issue? Took a while to get a FreeBSD VM running.

Hm, no it doesn't, "pp" is still visible on the first line.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4150770479@github.com>

Foxe Chen

unread,
Mar 29, 2026, 5:03:13 PMMar 29
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19852)

does this patch fix your issue? Took a while to get a FreeBSD VM running.

Hm, no it doesn't, "pp" is still visible on the first line.

I think this just may be a problem with Terminal.app or the FreeBSD console. Does running echo -n -e '\033[?2026$p' only output a single p? Does this also happen on other terminal programs on MacOS? Thanks.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4151083871@github.com>

Dorian Marié

unread,
Mar 30, 2026, 11:31:18 AMMar 30
to vim/vim, Subscribed
dorianmariecom left a comment (vim/vim#19852)
> echo -n -e '\033[?2026$p'
p⏎                               

yes it outputs a single p


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4155944503@github.com>

Dorian Marié

unread,
Mar 30, 2026, 11:36:00 AMMar 30
to vim/vim, Subscribed
dorianmariecom left a comment (vim/vim#19852)

doesn't happen in iterm


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4155991609@github.com>

Palle Girgensohn

unread,
Apr 1, 2026, 6:46:00 AMApr 1
to vim/vim, Subscribed
girgen left a comment (vim/vim#19852)

I see the same issue.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4169179006@github.com>

Greg Hamerly

unread,
Apr 1, 2026, 2:00:21 PMApr 1
to vim/vim, Subscribed
ghamerly left a comment (vim/vim#19852)

I think this is directly related to #19720


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4171962799@github.com>

Foxe Chen

unread,
Apr 1, 2026, 2:17:18 PMApr 1
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19852)

I suppose the solution to this would be to add an option for vim to stop sending DEC terminal sequences. I will create a PR for this


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4172058789@github.com>

Oscar Westra van Holthe - Kind

unread,
Apr 8, 2026, 3:13:45 AM (10 days ago) Apr 8
to vim/vim, Subscribed
opwvhk left a comment (vim/vim#19852)

With ViM 9.2.250, installed on OSX via brew, I also get this issue when opening an existing file. In my case, I only saw the 2nd p, as the 1st was overwritten by the file content.

As you can see, the pp is not part of the buffer content:

https://github.com/user-attachments/assets/814bc6ff-9176-4195-a6fb-2fcf7b313144


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4204463793@github.com>

Foxe Chen

unread,
Apr 8, 2026, 8:14:42 PM (10 days ago) Apr 8
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19852)

Does this patch fix the issue for you guys?

diff --git a/src/main.c b/src/main.c
index d4019ff51..32a85b01d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -893,9 +893,6 @@ vim_main2(void)
 
     may_req_bg_color();
 # endif
-    // Same reason for termresponse, don't want the terminal sending out the
-    // DECRPM response after Vim has exited.
-    send_decrqm_modes();
 
     // start in insert mode
     if (p_im)
diff --git a/src/proto/term.pro b/src/proto/term.pro
index 82c794f4f..9653a35af 100644
--- a/src/proto/term.pro
+++ b/src/proto/term.pro
@@ -96,7 +96,6 @@ void swap_tcap(void);
 void ansi_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx);
 void cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx);
 int term_replace_keycodes(char_u *ta_buf, int ta_len, int len_arg);
-void send_decrqm_modes(void);
 void term_disable_dec(void);
 void term_set_win_resize(bool state);
 void term_set_sync_output(int flags);
diff --git a/src/term.c b/src/term.c
index 468a7eb48..48e678291 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1539,8 +1539,10 @@ typedef struct {
 #define TPR_MOUSE		    3
 // term response indicates kitty
 #define TPR_KITTY		    4
+// can send DECRQM requests to terminal
+#define TPR_DECRQM		    5
 // table size
-#define TPR_COUNT		    5
+#define TPR_COUNT		    6
 
 static termprop_T term_props[TPR_COUNT];
 
@@ -1564,6 +1566,8 @@ init_term_props(int all)
     term_props[TPR_MOUSE].tpr_set_by_termresponse = TRUE;
     term_props[TPR_KITTY].tpr_name = "kitty";
     term_props[TPR_KITTY].tpr_set_by_termresponse = FALSE;
+    term_props[TPR_DECRQM].tpr_name = "decrqm";
+    term_props[TPR_DECRQM].tpr_set_by_termresponse = FALSE;
 
     for (i = 0; i < TPR_COUNT; ++i)
 	if (all || term_props[i].tpr_set_by_termresponse)
@@ -5176,6 +5180,9 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
 	if (version == 95)
 	{
 	    // Mac Terminal.app sends 1;95;0
+	    // 
+	    // Terminal.app doesn't seem to handle DECRQM sequences
+	    // properly, see issue #19852.
 	    if (arg[0] == 1 && arg[2] == 0)
 	    {
 		term_props[TPR_UNDERLINE_RGB].tpr_status = TPR_YES;
@@ -5186,6 +5193,7 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
 	    {
 		// iTerm2 can do SGR mouse reporting
 		term_props[TPR_MOUSE].tpr_status = TPR_MOUSE_SGR;
+		term_props[TPR_DECRQM].tpr_status = TPR_YES;
 	    }
 	    // old iTerm2 sends 0;95;
 	    else if (arg[0] == 0 && arg[2] == -1)
@@ -5211,6 +5219,7 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
 		term_props[TPR_MOUSE].tpr_status = TPR_MOUSE_SGR;
 	    else if (version >= 95)
 		term_props[TPR_MOUSE].tpr_status = TPR_MOUSE_XTERM2;
+	    term_props[TPR_DECRQM].tpr_status = TPR_YES;
 	}
 
 	// Detect terminals that set $TERM to something like
@@ -5251,6 +5260,7 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
 
 	    // Kitty can handle SGR mouse reporting.
 	    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.
@@ -5308,9 +5318,20 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
 				    ? (char_u *)"sgr" : (char_u *)"xterm2", 0);
 	}
 
-#ifdef FEAT_TERMRESPONSE
 	int need_flush = FALSE;
 
+	// Send DECRQM sequences conditionally
+	if (term_props[TPR_DECRQM].tpr_status == TPR_YES)
+	{
+	    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);
+	    }
+	    need_flush = TRUE;
+	}
+
+#ifdef FEAT_TERMRESPONSE
 	// Only request the cursor style if t_SH and t_RS are
 	// set. Only supported properly by xterm since version
 	// 279 (otherwise it returns 0x18).
@@ -5343,10 +5364,10 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
 	    termrequest_sent(&rbm_status);
 	    need_flush = TRUE;
 	}
+#endif
 
 	if (need_flush)
 	    out_flush();
-#endif
     }
 }
 
@@ -7986,24 +8007,6 @@ term_replace_keycodes(char_u *ta_buf, int ta_len, int len_arg)
     return len;
 }
 
-/*
- * Query the settings for the DEC modes we support
- */
-    void
-send_decrqm_modes(void)
-{
-    if (termcap_active && cur_tmode == TMODE_RAW)
-    {
-	// 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();
-    }
-}
-
 /*
  * Should be called when cleaning up terminal state.
  */


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4210548730@github.com>

Oscar Westra van Holthe - Kind

unread,
Apr 10, 2026, 5:09:00 AM (8 days ago) Apr 10
to vim/vim, Subscribed
opwvhk left a comment (vim/vim#19852)

I think this is directly related to #19720

I can confirm this for my situation: the extra characters do not after commenting out the setting set background=dark.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4222428569@github.com>

Christian Brabandt

unread,
Apr 10, 2026, 5:13:45 AM (8 days ago) Apr 10
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19852)

could you please check #19938 if this fixes it for you?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4222453237@github.com>

Christian Brabandt

unread,
Apr 14, 2026, 5:23:28 PM (4 days ago) Apr 14
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19852)

so can anybody who is affected by this please check the PR?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4247232641@github.com>

gaston-flag

unread,
Apr 16, 2026, 8:45:01 AM (2 days ago) Apr 16
to vim/vim, Subscribed
gaston-flag left a comment (vim/vim#19852)

#19938 does not fix it for me. I have the same problem; first noticed it in the Kali-shipped vim 9.2.218, but the issue remains when I build and install it from the current source on a fresh system. I am using the QTerminal 2.3.0 with TERM=xterm-256color.

Actually, while git-bisecting, I noticed that there was already a (similar) issue before v9.2.0200. In v9.2.0.0109 everything is fine, but in v9.2.0110 when I open vim I get a single p at the top left corner.

Screenshot_2026-04-16_13-59-08.png (view on web)

... except when I launch it using TERM=dumb vim --clean, in which case I get a p in the bottom left corner:

Screenshot_2026-04-16_14-34-15.png (view on web)

This was also not an issue in v9.2.0109.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4260140790@github.com>

h_east

unread,
Apr 16, 2026, 9:47:14 AM (2 days ago) Apr 16
to vim/vim, Subscribed
h-east left a comment (vim/vim#19852)

Did you retrieve the changes from PR #19938 locally and test them in a built Vim? Could you please report what behavior you observed?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4260542244@github.com>

gaston-flag

unread,
Apr 16, 2026, 10:57:06 AM (2 days ago) Apr 16
to vim/vim, Subscribed
gaston-flag left a comment (vim/vim#19852)

I merged #19938 into the current master branch of this repo locally, then built and installed it. The "pp" is still there when I open vim. Actually, I just noticed a difference in behavior (compared to the current master version). If I apply #19938, when I launch vim --clean, the cursor is located after the pp, though the printed cursor position in the ruler is still 0,0-1, instead of being in the top left corner:

Screenshot_2026-04-16_16-22-41.png (view on web)

Also, behavior is also different when using TERM=dumb (I don't know how relevant this is). Before applying the PR, when vim --clean is opened, I get the following (pp in bottom left):

Screenshot_2026-04-16_16-33-15.png (view on web)

After applying the changes, there is no pp anymore:

Screenshot_2026-04-16_16-38-19.png (view on web)

When using TERM=dumb the first line gets filled with some stuff previously printed in the terminal. I don't know if this is supposed to be the case, but this happens regardless of whether or not the PR has been applied.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4261063284@github.com>

h_east

unread,
Apr 17, 2026, 11:31:29 AM (23 hours ago) Apr 17
to vim/vim, Subscribed
h-east left a comment (vim/vim#19852)

I've updated PR #19938. CI is all green.
Could you please check it now?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19852/4269312945@github.com>

Reply all
Reply to author
Forward
0 new messages