diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-01-29 12:07:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-29 12:07:27 +0100 |
commit | 216ec739721494fb31111f19b1dee356a0d88ba1 (patch) | |
tree | 8a9f1cb65b7e1d2f7fb1a950264c38a0fea5ba81 /test/functional/lua/ui_event_spec.lua | |
parent | e7ebc5c13d2d1658005a7fb477bc92718044746f (diff) | |
download | rneovim-216ec739721494fb31111f19b1dee356a0d88ba1.tar.gz rneovim-216ec739721494fb31111f19b1dee356a0d88ba1.tar.bz2 rneovim-216ec739721494fb31111f19b1dee356a0d88ba1.zip |
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.
Diffstat (limited to 'test/functional/lua/ui_event_spec.lua')
-rw-r--r-- | test/functional/lua/ui_event_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index 80457555d4..ddb10127e4 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -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 } }, |