From 5d5f891afb3bcde90da2295154b94f2825866230 Mon Sep 17 00:00:00 2001 From: hedy Date: Thu, 30 Nov 2023 19:07:25 +0800 Subject: [PATCH] fix(live-preview): Don't focus when it shouldn't for auto-preview --- lua/outline/preview.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/outline/preview.lua b/lua/outline/preview.lua index 384ecb4..7947c22 100644 --- a/lua/outline/preview.lua +++ b/lua/outline/preview.lua @@ -310,7 +310,10 @@ function LivePreview:show() return end - if node == self.last_node then + if node == self.last_node and not self.conf.auto_preview then + -- Focus is called manually through keybinding from sidebar.lua. This + -- should only be used on second toggle_preview call in the case of no + -- auto-preview. self:focus() else self:update(node)