summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Lim <50560759+joelim-work@users.noreply.github.com>2024-03-10 13:08:38 +1100
committerGitHub <noreply@github.com>2024-03-10 13:08:38 +1100
commitd2136df5384ad320c71156c0aba52a84dd704c03 (patch)
treedb4c1ea05d4995de881638723b7c4695848d0fd7
parent44c6aead23a861dcf2c34c0f909135023a74654b (diff)
Clear cached sixels after horizontal resize (#1629)
-rw-r--r--eval.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/eval.go b/eval.go
index 17e927f..a406c32 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)
}