From 29983d266000941606f5a51090268953bc0ab19f Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 29 Jun 2024 19:43:20 +0200 Subject: term: fix sixel OOB x is clamped to 0, so there is no need to offset it by offx. --- src/local/term.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/local/term.nim b/src/local/term.nim index 8dcff9ba..f2b48f36 100644 --- a/src/local/term.nim +++ b/src/local/term.nim @@ -749,7 +749,7 @@ proc outputSixelImage(term: Terminal; x, y: int; image: CanvasImage) = let H = disph * int(bmp.width) # end at disph var m = y * term.attrs.width * term.attrs.ppl # track absolute y let realw = dispw - offx - let cx0 = x * term.attrs.ppc + offx + let cx0 = x * term.attrs.ppc while n < H: var bands = newSeq[SixelBand]() for i in 0 ..< 6: -- cgit 1.4.1-2-gfad0