You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have two or more windows opened. Open code action in a non-leftmost window. Enter secondary float and close it ('q' or '<cr>').
Expected behaviour
Cursor to return to the window in which code action was invoked.
Actual behaviour
Cursor is returned to the leftmost window.
NB: I've made a temporary fix for myself by tracking the current window: M.state.cur_win = vim.api.nvim_get_current_win() in on_code_action_results vim.api.nvim_set_current_win(M.state.cur_win) in cleanup
My guess is that on window close, nvim moves caret to 'other' window. Since 2 are closed, there is no other window to use and the leftmost is chosen.
The minimal config used to reproduce this issue.
---
The text was updated successfully, but these errors were encountered:
Thanks for reporting!
I don't quite understand the steps to reproduce. It tried with two splits, but couldn't reproduce the behaviour described.
Could you please rephrase it in terms of commands and key presses?
E.g.
Neovim version (nvim -v)
0.10.0
Operating system/version
ubuntu 22.04
Output of :checkhealth rustaceanvim
---
How to reproduce the issue
Have two or more windows opened. Open code action in a non-leftmost window. Enter secondary float and close it ('q' or '<cr>').
Expected behaviour
Cursor to return to the window in which code action was invoked.
Actual behaviour
Cursor is returned to the leftmost window.
NB: I've made a temporary fix for myself by tracking the current window:
M.state.cur_win = vim.api.nvim_get_current_win()
inon_code_action_results
vim.api.nvim_set_current_win(M.state.cur_win)
incleanup
My guess is that on window close, nvim moves caret to 'other' window. Since 2 are closed, there is no other window to use and the leftmost is chosen.
The minimal config used to reproduce this issue.
---
The text was updated successfully, but these errors were encountered: