From c5dfd6df5124bc4a4b3674a33907731f64c346cf Mon Sep 17 00:00:00 2001 From: Seninha <63266536+phillbush@users.noreply.github.com> Date: Sat, 1 Oct 2022 10:36:26 -0300 Subject: [PATCH] implement gokcehan#606 (#945) --- nav.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nav.go b/nav.go index 00ed77d..1860e6c 100644 --- a/nav.go +++ b/nav.go @@ -612,17 +612,21 @@ func (nav *nav) previewLoop(ui *ui) { break loop } } + win := ui.wins[len(ui.wins)-1] if clear && len(gOpts.previewer) != 0 && len(gOpts.cleaner) != 0 && nav.volatilePreview { nav.exportFiles() exportOpts() - cmd := exec.Command(gOpts.cleaner, prev) + cmd := exec.Command(gOpts.cleaner, prev, + strconv.Itoa(win.w), + strconv.Itoa(win.h), + strconv.Itoa(win.x), + strconv.Itoa(win.y)) if err := cmd.Run(); err != nil { log.Printf("cleaning preview: %s", err) } nav.volatilePreview = false } if len(path) != 0 { - win := ui.wins[len(ui.wins)-1] nav.preview(path, win) prev = path }