Skip to content

Commit 93fcf0a

Browse files
authored
fix(preview): revert when jumping to preview window if it is not floating (#1070)
1 parent 3c68ae5 commit 93fcf0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/neo-tree/sources/common/preview.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ Preview.toggle = function(state)
393393
local preview_event = {
394394
event = events.VIM_CURSOR_MOVED,
395395
handler = function()
396-
if not toggle_state or vim.api.nvim_get_current_win() == instance.winid then
396+
local did_enter_preview = vim.api.nvim_get_current_win() == instance.winid
397+
if not toggle_state or (did_enter_preview and instance.config.use_float) then
397398
return
398399
end
399400
if vim.api.nvim_get_current_win() == winid then

0 commit comments

Comments
 (0)