[vim/vim] Fix excessive scroll-up with guioptions+=! and ConPTY (PR #19735)

0 views
Skip to first unread message

mattn

unread,
Mar 17, 2026, 10:05:25 PM (2 hours ago) Mar 17
to vim/vim, Subscribed

patch 9.2.0048 (71cc1b1) made ConPTY the default on Windows 11. Since then, running :!cmd (e.g. :!git diff) with guioptions+=! scrolls the screen up by the entire window height, instead of scrolling up only as many lines as the command actually outputs.

The cause is that ConPTY damages (marks dirty) all terminal rows on initialization, even rows that are still empty. This makes tl_dirty_row_end equal to Rows, so the scroll-up loop in update_system_term() keeps scrolling until tl_toprow reaches 0.

The fix uses the terminal cursor position (tl_cursor_pos.row + 1) instead of tl_dirty_row_end for the scroll calculation. The cursor position reflects where content has actually been written, so scrolling is limited to the lines that have real output.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19735

Commit Summary

  • 73cb92a Fix excessive scroll-up with guioptions+=! and ConPTY

File Changes

(1 file)

Patch Links:


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

mattn

unread,
Mar 17, 2026, 10:27:57 PM (2 hours ago) Mar 17
to vim/vim, Push

@mattn pushed 1 commit.

  • 3aaf602 Add test for system terminal scroll with guioptions+=!


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19735/before/73cb92a4db739e1c422edebac7fba7bfd6c57e2d/after/3aaf602e07af6f102e1b04005dd4ae9e2e381907@github.com>

mattn

unread,
Mar 17, 2026, 10:35:29 PM (1 hour ago) Mar 17
to vim/vim, Push

@mattn pushed 1 commit.

  • 066ac75 Add comment explaining cursor-based scroll in update_system_term()

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19735/before/3aaf602e07af6f102e1b04005dd4ae9e2e381907/after/066ac7504a8ab1fb8a4762d4042244c4b7b6875b@github.com>

mattn

unread,
12:00 AM (now) 12:00 AM
to vim/vim, Push

@mattn pushed 1 commit.

  • 749c38b Fix test to use long-running command for timer to fire

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19735/before/066ac7504a8ab1fb8a4762d4042244c4b7b6875b/after/749c38bffa8e30ed1beafb035aa9af12a1a84c64@github.com>

Reply all
Reply to author
Forward
0 new messages