about summary refs log tree commit diff stats
path: root/src/display
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-14 13:20:38 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-14 13:20:38 +0100
commit781ac333e503b72d5d6070af02269164806cc597 (patch)
treed07b69ba824d42be7c0fdbb0b8e0d18ed82a9d96 /src/display
parent2eb56a4ae5f86ae0485abbf3a7ab0b1bd50dfe98 (diff)
downloadchawan-781ac333e503b72d5d6070af02269164806cc597.tar.gz
twtstr: fix deleteChars, do not remove space in replaceControls
Diffstat (limited to 'src/display')
-rw-r--r--src/display/term.nim6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/display/term.nim b/src/display/term.nim
index 6358535f..cb96a385 100644
--- a/src/display/term.nim
+++ b/src/display/term.nim
@@ -407,11 +407,7 @@ proc processFormat*(term: Terminal, format: var Format, cellf: Format): string =
 
 proc setTitle*(term: Terminal, title: string) =
   if term.set_title:
-    let title = if Controls in title:
-      title.replaceControls()
-    else:
-      title
-    term.outfile.write(XTERM_TITLE(title))
+    term.outfile.write(XTERM_TITLE(title.replaceControls()))
 
 proc enableMouse*(term: Terminal) =
   term.write(XTSHIFTESCAPE & SGRMOUSEBTNON)