Files
neovim/runtime/lua/vim
Au. 2435d72283 fix(lsp): opts.reuse_win does not jump if buf is already open #33476
Problem:
`vim.lsp.buf.[implementation|definition|...]({ reuse_win = true })` does not
jump cursor to existing window if buffer is already open.

Steps to reproduce:
1. `nvim repro.lua`
2. Insert anything that lsp can read to open the library definition/implementation, e.g., `vim.keymap.set`
3. open `repro.lua` buffer and the library buffer side by side.
4. type `gd` over `set` to jump to the library definition.

The open buffer is scrolled to the target line, but cursor does not jump.

Solution:
Call nvim_set_current_win if necessary.

(cherry picked from commit 6926fc1615)
2025-04-17 15:12:46 +00:00
..
2025-04-12 10:56:28 -07:00
2025-01-30 13:46:06 +01:00
2024-03-06 10:45:22 +00:00
2024-01-16 09:33:10 +00:00
2025-03-15 15:00:44 +01:00
2025-03-15 15:00:44 +01:00
2025-02-26 23:06:22 +01:00