mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 20:52:19 +00:00
Graphics protocol: Add a new delete mode for deleting images whose ids fall within a range
Useful for bulk deletion. See #7080
This commit is contained in:
parent
ad3ab877f8
commit
c19488f3be
7 changed files with 36 additions and 12 deletions
|
|
@ -1016,6 +1016,13 @@ class TestGraphics(BaseTest):
|
|||
put_image(s, cw, ch, z=9)
|
||||
delete('Z', z=9)
|
||||
self.ae(s.grman.image_count, 0)
|
||||
put_image(s, cw, ch, id=1)
|
||||
put_image(s, cw, ch, id=2)
|
||||
put_image(s, cw, ch, id=3)
|
||||
delete('R', y=2)
|
||||
self.ae(s.grman.image_count, 1)
|
||||
delete('R', x=3, y=3)
|
||||
self.ae(s.grman.image_count, 0)
|
||||
self.assertEqual(s.grman.disk_cache.total_size, 0)
|
||||
|
||||
# test put + delete + put
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue