aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-18 20:34:01 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-18 20:34:01 +0200
commit2f8edaffdcf22b90389d214b730ea9e28a3b2e5a (patch)
treecec7f20acfd0ebab5d2c32af11062b37ce614347 /src
parent6f391e31a8b8298f16e1812c118616a84eb9b849 (diff)
downloadchawan-2f8edaffdcf22b90389d214b730ea9e28a3b2e5a.tar.gz
lineedit: fix a display bug
The editor box never uses the last cell. However, it should still overwrite it.
Diffstat (limited to 'src')
-rw-r--r--src/display/lineedit.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display/lineedit.nim b/src/display/lineedit.nim
index c2adc560..53223be9 100644
--- a/src/display/lineedit.nim
+++ b/src/display/lineedit.nim
@@ -85,7 +85,8 @@ proc shiftView(edit: LineEdit) =
proc generateOutput*(edit: LineEdit): FixedGrid =
edit.shiftView()
- result = newFixedGrid(edit.promptw + edit.maxwidth)
+ # Make the output grid +1 cell wide, so it covers the whole input area.
+ result = newFixedGrid(edit.promptw + edit.maxwidth + 1)
var x = 0
for r in edit.prompt.runes:
result[x].str &= $r