fix: hijack_cursor on update focused file and vim search (#2600)
refactor: hijack_cursor search skip
This commit is contained in:
parent
96a783fbd6
commit
02ae52357b
@ -112,13 +112,11 @@ function M.reset_highlight()
|
|||||||
renderer.render_hl(view.get_bufnr())
|
renderer.render_hl(view.get_bufnr())
|
||||||
end
|
end
|
||||||
|
|
||||||
local prev_line
|
|
||||||
function M.place_cursor_on_node()
|
function M.place_cursor_on_node()
|
||||||
local l = vim.api.nvim_win_get_cursor(0)[1]
|
local search = vim.fn.searchcount()
|
||||||
if l == prev_line then
|
if search and search.exact_match == 1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
prev_line = l
|
|
||||||
|
|
||||||
local node = lib.get_node_at_cursor()
|
local node = lib.get_node_at_cursor()
|
||||||
if not node or node.name == ".." then
|
if not node or node.name == ".." then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user