mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 19:39:53 +10:00
fix(ui): avoid redundant ext_cmdline events (#32237)
Problem: `cmdline_show` is emitted unnecessarily each event
loop iteration, because `cmdline_was_last_drawn` is never set.
Solution: Keep track of whether the cmdline was last drawn to avoid
unnecessarily emitting cmdline_show. Set `redraw_state` to
emit `cmdline_pos` when emitting `CursorMovedC`. Only emit
`cmdline_pos` when cmdline was last drawn.
This commit is contained in:
@@ -202,7 +202,7 @@ describe('vim.ui_attach', function()
|
||||
feed([[:call confirm("Save changes?", "&Yes\n&No\n&Cancel")<CR>]])
|
||||
screen:expect({
|
||||
grid = [[
|
||||
^5 |
|
||||
^4 |
|
||||
{1:~ }|*4
|
||||
]],
|
||||
cmdline = {
|
||||
@@ -224,7 +224,7 @@ describe('vim.ui_attach', function()
|
||||
feed('n')
|
||||
screen:expect({
|
||||
grid = [[
|
||||
^5 |
|
||||
^4 |
|
||||
{1:~ }|*4
|
||||
]],
|
||||
cmdline = { { abort = false } },
|
||||
|
||||
Reference in New Issue
Block a user