Add incsearch_redraw_keys settings (#1162)
This commit is contained in:
@@ -226,12 +226,13 @@ misc.redraw = setmetatable({
|
|||||||
doing = false,
|
doing = false,
|
||||||
force = false,
|
force = false,
|
||||||
-- We use `<Up><Down>` to redraw the screen. (Previously, We use <C-r><ESC>. it will remove the unmatches search history.)
|
-- We use `<Up><Down>` to redraw the screen. (Previously, We use <C-r><ESC>. it will remove the unmatches search history.)
|
||||||
termcode = vim.api.nvim_replace_termcodes('<Up><Down>', true, true, true),
|
incsearch_redraw_keys = '<Up><Down>',
|
||||||
}, {
|
}, {
|
||||||
__call = function(self, force)
|
__call = function(self, force)
|
||||||
|
local termcode = vim.api.nvim_replace_termcodes(self.incsearch_redraw_keys, true, true, true)
|
||||||
if vim.tbl_contains({ '/', '?' }, vim.fn.getcmdtype()) then
|
if vim.tbl_contains({ '/', '?' }, vim.fn.getcmdtype()) then
|
||||||
if vim.o.incsearch then
|
if vim.o.incsearch then
|
||||||
return vim.api.nvim_feedkeys(self.termcode, 'in', true)
|
return vim.api.nvim_feedkeys(termcode, 'in', true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user