From 1b187f3f7ede92c35915049736a13637697c0a8a Mon Sep 17 00:00:00 2001 From: Joe Lim <50560759+joelim-work@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:20:59 +1100 Subject: [PATCH] Clear cached sixels after horizontal resize --- eval.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eval.go b/eval.go index 17e927fe..a406c32b 100644 --- a/eval.go +++ b/eval.go @@ -90,6 +90,9 @@ func (e *setExpr) eval(app *app, args []string) { if app.nav.height != app.ui.wins[0].h { app.nav.height = app.ui.wins[0].h app.nav.regCache = make(map[string]*reg) + if gOpts.sixel { + app.ui.sxScreen.lastFile = "" + } } app.ui.loadFile(app, true) } @@ -336,6 +339,10 @@ func (e *setExpr) eval(app *app, args []string) { } gOpts.ratios = rats app.ui.wins = getWins(app.ui.screen) + if gOpts.sixel { + app.nav.regCache = make(map[string]*reg) + app.ui.sxScreen.lastFile = "" + } app.ui.loadFile(app, true) case "scrolloff": n, err := strconv.Atoi(e.val) @@ -1352,6 +1359,10 @@ func (e *callExpr) eval(app *app, args []string) { app.nav.height = app.ui.wins[0].h app.nav.regCache = make(map[string]*reg) } + if gOpts.sixel { + app.nav.regCache = make(map[string]*reg) + app.ui.sxScreen.lastFile = "" + } for _, dir := range app.nav.dirs { dir.boundPos(app.nav.height) }