Real-image posters: a new size is a new image id, never a changed placement
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -193,8 +193,8 @@ func New(cfg *config.Config) *App {
|
||||
}
|
||||
|
||||
// noteWindow notices when the terminal's size or cell size changed. The
|
||||
// placements of real-image posters are then made again: the picture would
|
||||
// otherwise rely on the terminal rescaling an existing placement correctly.
|
||||
// real-image posters are then uploaded and placed again from scratch instead of
|
||||
// relying on the terminal to rescale what is there.
|
||||
func (a *App) noteWindow(s tcell.Screen) {
|
||||
w, h := s.Size()
|
||||
win := [3]int{w, h, int(a.cellAspect * 1000)}
|
||||
@@ -204,7 +204,7 @@ func (a *App) noteWindow(s tcell.Screen) {
|
||||
first := a.lastWindow == [3]int{}
|
||||
a.lastWindow = win
|
||||
if !first && a.gfx != nil {
|
||||
a.gfx.invalidate()
|
||||
a.gfx.deleteAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user