diff options
author | Joe Lim <50560759+joelim-work@users.noreply.github.com> | 2024-03-10 13:08:38 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-10 13:08:38 +1100 |
commit | d2136df5384ad320c71156c0aba52a84dd704c03 (patch) | |
tree | db4c1ea05d4995de881638723b7c4695848d0fd7 | |
parent | 44c6aead23a861dcf2c34c0f909135023a74654b (diff) |
Clear cached sixels after horizontal resize (#1629)
-rw-r--r-- | eval.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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) } |