aboutsummaryrefslogtreecommitdiffstats
path: root/src/local
diff options
context:
space:
mode:
Diffstat (limited to 'src/local')
-rw-r--r--src/local/term.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/local/term.nim b/src/local/term.nim
index 91fe4a88..546b16fa 100644
--- a/src/local/term.nim
+++ b/src/local/term.nim
@@ -647,12 +647,10 @@ proc clearImage*(term: Terminal; image: CanvasImage; maxh: int) =
of imNone: discard
of imSixel:
# we must clear sixels the same way as we clear text.
- var y = max(image.y, 0)
let ey = min(image.y + int(image.bmp.height), maxh)
- let x = image.x
- while y < ey:
+ let x = max(image.x, 0)
+ for y in max(image.y, 0) ..< ey:
term.lineDamage[y] = min(x, term.lineDamage[y])
- inc y
of imKitty:
term.imagesToClear.add(image)