We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dd61f3 commit 4414078Copy full SHA for 4414078
1 file changed
lua/ui/cmdline.lua
@@ -496,6 +496,7 @@ cmdline.cmdline_hide = function ()
496
utils.confirm_keys();
497
498
-- Reset exported height.
499
+ -- Also reset state.
500
vim.g.__ui_cmd_height = 0;
501
cmdline.old_state = {}; ---@diagnostic disable-line
502
@@ -604,10 +605,14 @@ cmdline.setup = function ()
604
605
606
vim.api.nvim_create_autocmd("VimResized", {
607
callback = function ()
- log.assert(
608
- "ui/cmdline.lua",
609
- pcall(cmdline.__render)
610
- );
+ -- Only redraw if the cmdline
+ -- window is visible.
+ if vim.g.__ui_cmd_height > 0 then
611
+ log.assert(
612
+ "ui/cmdline.lua",
613
+ pcall(cmdline.__render)
614
+ );
615
+ end
616
end
617
});
618
0 commit comments