fixup: prevent wildmode=list from disapearing

don't call redrawstatus on command mode if wildmode is set to list
fixes #781
This commit is contained in:
shadmansaleh 2022-08-05 08:37:28 +06:00
parent b1042d3184
commit f40db9a224
1 changed files with 11 additions and 5 deletions

View File

@ -438,11 +438,17 @@ local function refresh(opts)
end end
end end
-- call redraw -- call redraw on command mode unless &wildmode=list
if vim.tbl_contains(opts.place, 'statusline') or vim.tbl_contains(opts.place, 'winbar') then -- workaround for
vim.cmd('redrawstatus') -- https://github.com/neovim/neovim/issues/19472
elseif vim.tbl_contains(opts.place, 'tabline') then -- https://github.com/nvim-lualine/lualine.nvim/issues/781
vim.cmd('redrawtabline') -- Note when wildmode is set to list https://github.com/neovim/neovim/issues/19472 issue persists.
if vim.api.nvim_get_mode().mode == 'c' and not vim.go.wildmode:find('list') then
if vim.tbl_contains(opts.place, 'statusline') or vim.tbl_contains(opts.place, 'winbar') then
vim.cmd('redrawstatus')
elseif vim.tbl_contains(opts.place, 'tabline') then
vim.cmd('redrawtabline')
end
end end
vim.g.actual_curwin = old_actual_curwin vim.g.actual_curwin = old_actual_curwin