]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0346: Wrong cursor position when entering command line window v9.2.0346
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 14 Apr 2026 16:56:03 +0000 (16:56 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 14 Apr 2026 16:56:03 +0000 (16:56 +0000)
commitc4fe1e958a2051d443abe072c8a5366a887da9b3
tree280d3d9e1b7472b6e8311a55019124e5a7e3b8e7
parentefbd482116d0f1a244b436a46ce3544b016de04b
patch 9.2.0346: Wrong cursor position when entering command line window

Problem:  Wrong cursor position when entering command line window
Solution: Add check_cursor() command to verify the cursor position
          (Hirohito Higashi).

When opening the command-line window with CTRL-F after typing a command
that fills the screen width, the cursor was placed past the end of the
line.  Add check_cursor() after setting State to MODE_NORMAL so the
cursor is adjusted to the last character.

Also fix the cmdwin prefix character (e.g. ':') being drawn on wrapped
continuation rows.  Draw an empty space instead so that the text
alignment is preserved.

closes: #19964

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/drawline.c
src/ex_getln.c
src/testdir/dumps/Test_cmdwin_wrap_prefix.dump [new file with mode: 0644]
src/testdir/dumps/Test_wildmenu_pum_22.dump
src/testdir/test_cmdline.vim
src/testdir/test_cmdwin.vim
src/version.c