vim-patch:9.2.0346: Wrong cursor position when entering command line window (#39072)

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: vim/vim#19964

c4fe1e958a

Cherry-pick Test_wildmenu_pum() changes from patch 9.1.1995.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
zeertzjq
2026-04-15 18:22:05 +08:00
committed by GitHub
parent 92317013b4
commit 202e17deef
7 changed files with 134 additions and 16 deletions

View File

@@ -255,7 +255,7 @@ local function test_cmdline(linegrid)
screen:expect([[
|
{2:[No Name] }|
{1::}make^ |
{1::}mak^e |
{3:[Command Line] }|
|
]])
@@ -266,7 +266,7 @@ local function test_cmdline(linegrid)
grid = [[
|
{2:[No Name] }|
{1::}make^ |
{1::}mak^e |
{3:[Command Line] }|
|
]],
@@ -281,7 +281,7 @@ local function test_cmdline(linegrid)
grid = [[
|
{2:[No Name] }|
{1::}make^ |
{1::}mak^e |
{3:[Command Line] }|
|
]],
@@ -297,7 +297,7 @@ local function test_cmdline(linegrid)
grid = [[
|
{2:[No Name] }|
{1::}make^ |
{1::}mak^e |
{3:[Command Line] }|
|
]],