mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
feat(ui): emit "msg_clear" event after clearing the screen (#34035)
Problem: ext_messages cannot tell when the screen was cleared, which is
needed to clear visible messages. An empty message is also
never emitted, but clears messages from the message grid.
Solution: Repurpose the "msg_clear" event to be emitted when the screen
was cleared. Emit an empty message with the `empty` kind to
hint to a UI to clear the cmdline area.
This commit is contained in:
@@ -196,7 +196,7 @@ describe('vim.ui_attach', function()
|
||||
pos = 0,
|
||||
} },
|
||||
})
|
||||
feed('version<CR><CR>v<Esc>')
|
||||
feed('version<CR>')
|
||||
screen:expect({
|
||||
grid = [[
|
||||
^2 |
|
||||
@@ -208,7 +208,7 @@ describe('vim.ui_attach', function()
|
||||
screen.messages = {} -- Ignore the build dependent :version content
|
||||
end,
|
||||
})
|
||||
feed([[:call confirm("Save changes?", "&Yes\n&No\n&Cancel")<CR>]])
|
||||
feed([[v<Esc>:call confirm("Save changes?", "&Yes\n&No\n&Cancel")<CR>]])
|
||||
screen:expect({
|
||||
grid = [[
|
||||
^4 |
|
||||
|
||||
Reference in New Issue
Block a user