File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -959,7 +959,8 @@ create_window = function(state)
959959
960960 local win
961961 if state .current_position == " float" then
962- win = create_floating_window (state , win_options , bufname )
962+ M .close_all_floating_windows ()
963+ win = create_floating_window (state , win_options , bufname )
963964 elseif state .current_position == " current" then
964965 -- state.id is always the window id or tabnr that this state was created for
965966 -- in the case of a position = current state object, it will be the window id
@@ -992,8 +993,6 @@ create_window = function(state)
992993 state .bufnr = win .bufnr
993994 state .winid = win .winid
994995 location .winid = state .winid
995- vim .api .nvim_buf_set_name (state .bufnr , bufname )
996- vim .api .nvim_set_current_win (state .winid )
997996 end
998997 location .source = state .name
999998 end
@@ -1009,6 +1008,8 @@ create_window = function(state)
10091008 end
10101009
10111010 if win ~= nil then
1011+ vim .api .nvim_buf_set_name (state .bufnr , bufname )
1012+ vim .api .nvim_set_current_win (state .winid )
10121013 -- Used to track the position of the cursor within the tree as it gains and loses focus
10131014 --
10141015 -- Note `WinEnter` is often too early to restore the cursor position so we do not set
You can’t perform that action at this time.
0 commit comments