about summary refs log tree commit diff stats
path: root/src/render/renderdocument.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-05 17:54:22 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-05 18:01:00 +0200
commit4511c956bf62983f1d3f0252805fadaac040123e (patch)
tree9a04a74fda5ff70316948c775c7e133d5112b426 /src/render/renderdocument.nim
parent76cb8dee5e2066a7409f53edf74b2d3275ff4a7e (diff)
downloadchawan-4511c956bf62983f1d3f0252805fadaac040123e.tar.gz
Add popup menu for select element
Replaces the weird CSS implementation we have had until now with a
searchable popup menu similar to that of w3m. (The previous
implementation broke on websites that do not expect <select> to
expand on click, had no separate search, and was ugly.)
Diffstat (limited to 'src/render/renderdocument.nim')
-rw-r--r--src/render/renderdocument.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim
index afde059b..6f8b2a80 100644
--- a/src/render/renderdocument.nim
+++ b/src/render/renderdocument.nim
@@ -59,7 +59,7 @@ proc setText(lines: var FlexibleGrid, linestr: string, cformat: ComputedFormat,
     lines[y].str &= ' '.repeat(padwidth)
 
   lines[y].str &= linestr
-  let linestrwidth = linestr.twidth(x) - x
+  let linestrwidth = linestr.twidth(x)
 
   i = 0
   var nx = x # last x of new string