From 4a443cae58ffe417c4aebedd88aeae6380bf190c Mon Sep 17 00:00:00 2001 From: Joe Lim <50560759+joelim-work@users.noreply.github.com> Date: Sun, 12 Feb 2023 04:01:46 +1100 Subject: [PATCH] Refresh preview even if selection doesn't change (#1074) --- ui.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui.go b/ui.go index 2d888836..51607e3d 100644 --- a/ui.go +++ b/ui.go @@ -679,11 +679,10 @@ func (ui *ui) loadFile(app *app, volatile bool) { return } - if curr.path == ui.currentFile { - return + if curr.path != ui.currentFile { + ui.currentFile = curr.path + onSelect(app) } - ui.currentFile = curr.path - onSelect(app) if !gOpts.preview { return