With set wildoptions=pum and an autocmd such as autocmd CmdlineChanged [:\/\?] call wildtrigger(), typing enough characters to wrap the command line over multiple rows did not scroll the screen up; the cmdline stayed truncated on a single row.
redrawcmd() calls msg_start() which only forwards to msg_starthere() when !msg_didany || lines_left < 0. In the autocmd-driven popup refresh path redrawcmd() runs on every keystroke without msg_didany ever being reset, so lines_left decrements monotonically until it reaches 0. After that the msg_no_more && lines_left == 0 check in msg_puts_display() aborts drawing as soon as the cmdline overflows the current row, hiding the wrapped portion.
Call msg_starthere() explicitly at the start of redrawcmd() so lines_left is reset and the cmdline wraps and scrolls the screen the way it does when wildoptions=pum is not set.
Reproduce with:
set wildmenu set wildmode=noselect:lastused,full set wildoptions=pum augroup vimrc_wildtrigger autocmd! autocmd CmdlineChanged [:\/\?] call wildtrigger() augroup END
Then :e followed by a long run of spaces. Before this patch the cmdline freezes on the last row; after the patch it wraps and the buffer scrolls up.
https://github.com/vim/vim/pull/20081
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Thanks, can you add a test for the wrapping behaviour? I guess a screendump should work
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@mattn pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thank you. Added test.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thanks. It looks like Commit 2 fixes a slightly different issue, so let me split your PR into 2 separate patches.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()