Posters: re-place after a resize, measure cell size without padding, log failed posters
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,15 @@ func (k *kittyGraphics) place(id uint32, cols, rows int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// invalidate drops every placement (the uploaded pictures stay) so the next
|
||||
// draw places them again, e.g. after the terminal was resized.
|
||||
func (k *kittyGraphics) invalidate() {
|
||||
for id := range k.placed {
|
||||
_ = k.write(kittyAPC(fmt.Sprintf("a=d,d=i,i=%d,q=2", id), nil))
|
||||
}
|
||||
k.placed = map[uint32][2]int{}
|
||||
}
|
||||
|
||||
// deleteAll removes every image uploaded so far from the terminal.
|
||||
func (k *kittyGraphics) deleteAll() {
|
||||
for _, id := range k.ids {
|
||||
|
||||
Reference in New Issue
Block a user