Clear cached sixels after horizontal resize (#1629)

This commit is contained in:
Joe Lim authored and GitHub committed 2024-03-10 13:08:38 +11:00
1 parent 44c6aead23
commit d2136df538
1 file changed
+11
+11
View File
@@ -90,6 +90,9 @@ func (e *setExpr) eval(app *app, args []string) {
if app.nav.height != app.ui.wins[0].h { if app.nav.height != app.ui.wins[0].h {
app.nav.height = app.ui.wins[0].h app.nav.height = app.ui.wins[0].h
app.nav.regCache = make(map[string]*reg) app.nav.regCache = make(map[string]*reg)
if gOpts.sixel {
app.ui.sxScreen.lastFile = ""
}
} }
app.ui.loadFile(app, true) app.ui.loadFile(app, true)
} }
@@ -336,6 +339,10 @@ func (e *setExpr) eval(app *app, args []string) {
} }
gOpts.ratios = rats gOpts.ratios = rats
app.ui.wins = getWins(app.ui.screen) 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) app.ui.loadFile(app, true)
case "scrolloff": case "scrolloff":
n, err := strconv.Atoi(e.val) 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.height = app.ui.wins[0].h
app.nav.regCache = make(map[string]*reg) 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 { for _, dir := range app.nav.dirs {
dir.boundPos(app.nav.height) dir.boundPos(app.nav.height)
} }