fix: Outline refresh on CursorHold event moving cursor

Closes #7
This commit is contained in:
hedy
2023-11-12 08:30:05 +08:00
parent 434e2f83e1
commit f3ad74315d

View File

@@ -252,11 +252,15 @@ function M._highlight_current_item(winnr)
return return
end end
if if current_buffer_is_outline and not winnr then
not has_outline_open -- Outline not open -- Don't update cursor pos and content if they are navigating the outline.
-- Not currently on outline window, but no code window is given. -- Winnr may be given when user explicitly wants to restore location
or (not winnr and not current_buffer_is_outline) -- (follow_cursor), or through the open handler.
then return
end
if not has_outline_open and not winnr then
-- Outline not open and no code window given
return return
end end