From 14e245bbfa6146ad248ae1041bdac4fff274b1a6 Mon Sep 17 00:00:00 2001 From: eph Date: Mon, 6 Jan 2025 00:27:33 +0800 Subject: [PATCH] feat: add to jumplist before goto location --- lua/outline/sidebar.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/outline/sidebar.lua b/lua/outline/sidebar.lua index d04ce37..e0a5f8d 100644 --- a/lua/outline/sidebar.lua +++ b/lua/outline/sidebar.lua @@ -392,6 +392,9 @@ function Sidebar:__goto_location(change_focus) return end + -- XXX: There will be strange problems when using `nvim_buf_set_mark()`. + vim.fn.win_execute(self.code.win, "normal! m'") + vim.api.nvim_win_set_cursor(self.code.win, { node.line + 1, node.character }) if cfg.o.outline_window.center_on_jump then