about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-26 18:44:55 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-26 18:44:55 +0100
commit2471a1165a37ad2d25355f0f31b1830cabb26c35 (patch)
tree143726d0245b8a13328514b17683780a929e8dd9
parent98978cd9760b17f4f61c45bcc4c6c3c6f0d18a4f (diff)
downloadchawan-2471a1165a37ad2d25355f0f31b1830cabb26c35.tar.gz
term: fix display-charset not being interpreted
Also fixes the -O option.
-rw-r--r--src/local/term.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/local/term.nim b/src/local/term.nim
index b30c1a56..ccb1806d 100644
--- a/src/local/term.nim
+++ b/src/local/term.nim
@@ -680,11 +680,11 @@ proc applyConfig(term: Terminal) =
       if cs != CHARSET_UNKNOWN:
         term.cs = cs
         break
-    if term.cs in {CHARSET_UTF_8, CHARSET_UTF_16_LE, CHARSET_UTF_16_BE,
-        CHARSET_REPLACEMENT}:
-      term.cs = CHARSET_UTF_8
-    else:
-      term.te = newTextEncoder(term.cs)
+  if term.cs in {CHARSET_UTF_8, CHARSET_UTF_16_LE, CHARSET_UTF_16_BE,
+      CHARSET_REPLACEMENT}:
+    term.cs = CHARSET_UTF_8
+  else:
+    term.te = newTextEncoder(term.cs)
   term.applyConfigDimensions()
 
 proc outputGrid*(term: Terminal) =