about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-06-29 19:43:20 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-29 19:43:20 +0200
commit29983d266000941606f5a51090268953bc0ab19f (patch)
tree40b384f811033708fab69fb9c53ca4b5ab2df033 /src
parent420a716de6773c720b4d0af185294093825c037b (diff)
downloadchawan-29983d266000941606f5a51090268953bc0ab19f.tar.gz
term: fix sixel OOB
x is clamped to 0, so there is no need to offset it by offx.
Diffstat (limited to 'src')
-rw-r--r--src/local/term.nim2
1 files changed, 1 insertions, 1 deletions
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:
a id='n125' href='#n125'>125 126 127