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
{{ message }}
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
I was having the same issue and I think it has to do with an internal race on how the cursor position handling occurs when switching windows.
Adding this to my config to override the default goto_location handling has locally resolved the issue for me. I just don't know if its the right approach to fixing it.
Plugin.opts= {
keymaps= { -- These keymaps can be a string or a table for multiple keysgoto_location= {},
},
}
Plugin.config=function(_, opts)
require("symbols-outline").setup(opts)
vim.api.nvim_create_autocmd("FileType", {
pattern="Outline",
callback=function()
vim.keymap.set("n", "<CR>", function()
localoutline=require("symbols-outline")
localnode=outline._current_node()
vim.api.nvim_win_set_cursor(outline.state.code_win, { node.line+1, node.character })
vim.schedule(function()
vim.fn.win_gotoid(outline.state.code_win)
end)
end, { buffer=true })
end,
})
end
The key seems to be deferring win_gotoid just enough.
nvim version 0.9.0
when I press to goto the location of a symbol, if the symbols is not in the field of view, the cursor jump to a wrong place
The text was updated successfully, but these errors were encountered: