Skip to content

Commit

Permalink
Clear cached sixels after horizontal resize (#1629)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work authored Mar 10, 2024
1 parent 44c6aea commit d2136df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit d2136df

Please sign in to comment.