diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-10-07 16:46:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 08:46:17 -0700 |
commit | b55944e8af870e1132be8353070536dd17383852 (patch) | |
tree | 1992a13d6f7572f83bb1503ee0e97268f101d8aa /runtime/lua/vim/diagnostic.lua | |
parent | cbc60524f1fd705dbec209a171e2979c2dedd0b3 (diff) | |
download | rneovim-b55944e8af870e1132be8353070536dd17383852.tar.gz rneovim-b55944e8af870e1132be8353070536dd17383852.tar.bz2 rneovim-b55944e8af870e1132be8353070536dd17383852.zip |
feat(diagnostic): update jumplist on goto_next/prev (#15942)
Diffstat (limited to 'runtime/lua/vim/diagnostic.lua')
-rw-r--r-- | runtime/lua/vim/diagnostic.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index c7c8c1878e..7b74f4ec96 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -510,6 +510,9 @@ local function diagnostic_move_pos(opts, pos) return end + -- Save position in the window's jumplist + vim.api.nvim_win_call(win_id, function() vim.cmd("normal! m'") end) + vim.api.nvim_win_set_cursor(win_id, {pos[1] + 1, pos[2]}) if enable_popup then |