about summary refs log tree commit diff stats
path: root/src/local
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-24 01:44:35 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-24 01:49:20 +0200
commit3079e91c8aa0d60223deddd46cc3e652f32f05b7 (patch)
treefe54a3d14509dcd193401ab0ffd69f21fca9828b /src/local
parentd7085253b704f8f0e31fa1cacf82a55399565da1 (diff)
downloadchawan-3079e91c8aa0d60223deddd46cc3e652f32f05b7.tar.gz
sixel: use inline background for blending
still not really great, because inline background is a mess too
Diffstat (limited to 'src/local')
-rw-r--r--src/local/pager.nim2
-rw-r--r--src/local/term.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim
index 58ab9d77..31d21b6e 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -578,7 +578,7 @@ proc loadCachedImage(pager: Pager; container: Container; image: PosBitmap;
       url = newURL("img-codec+x-sixel:encode").get
       headers.add("Cha-Image-Sixel-Halfdump", "1")
       headers.add("Cha-Image-Sixel-Palette", $pager.term.sixelRegisterNum)
-      headers.add("Cha-Image-Background-Color", $pager.term.defaultBackground)
+      headers.add("Cha-Image-Background-Color", $image.bgcolor)
       headers.add("Cha-Image-Offset", $offx & 'x' & $erry)
       headers.add("Cha-Image-Crop-Width", $dispw)
     of imKitty:
diff --git a/src/local/term.nim b/src/local/term.nim
index 0495cc8e..0e245256 100644
--- a/src/local/term.nim
+++ b/src/local/term.nim
@@ -102,7 +102,7 @@ type
     stdinUnblocked: bool
     stdinWasUnblocked: bool
     origTermios: Termios
-    defaultBackground*: RGBColor
+    defaultBackground: RGBColor
     defaultForeground: RGBColor
     ibuf*: string # buffer for chars when we can't process them
     sixelRegisterNum*: int