mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
fix(ui2): show messages in dialog window when entering expanded cmdline #38465
Problem: - With expanded messages exceeding cfg.msg.cmd.height, entering
the cmdline scrolls to the bottom and expands to the full "cmd"
buffer text height.
- Cursor in the pager is not always at the last message and at
the bottom of the window when appending to the pager.
- unreliable test: messages2_spec: "closed msg window timer removes
empty lines".
Solution: - Achieve separation of the cmdline and message text by moving
messages to the dialog window when entering the cmdline below
expanded messages.
- Set cursor to start of the first message only when first
entering the pager. Use `norm! zb` to position last message
at the bottom of the window (which shouldn't crash anymore
since 911337eb).
- Increase cfg.msg.msg.timeout used in the test file.
This commit is contained in:
@@ -6,7 +6,7 @@ local Screen = require('test.functional.ui.screen')
|
||||
|
||||
local api, clear, command, exec_lua, feed = n.api, n.clear, n.command, n.exec_lua, n.feed
|
||||
|
||||
local msg_timeout = 200
|
||||
local msg_timeout = 400
|
||||
local function set_msg_target_zero_ch()
|
||||
exec_lua(function()
|
||||
require('vim._core.ui2').enable({ msg = { target = 'msg', msg = { timeout = msg_timeout } } })
|
||||
@@ -447,9 +447,9 @@ describe('messages2', function()
|
||||
foo |
|
||||
{1:~ }|*8
|
||||
{3: }|
|
||||
^foo |
|
||||
foo |
|
||||
bar |
|
||||
baz |
|
||||
^baz |
|
||||
{16::}{15:echo} {26:"baz"} |
|
||||
]])
|
||||
-- Subsequent typed commands are appended to the pager.
|
||||
|
||||
Reference in New Issue
Block a user