diff options
| author | bptato <nincsnevem662@gmail.com> | 2023-09-18 20:34:01 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2023-09-18 20:34:01 +0200 |
| commit | 2f8edaffdcf22b90389d214b730ea9e28a3b2e5a (patch) | |
| tree | cec7f20acfd0ebab5d2c32af11062b37ce614347 /src | |
| parent | 6f391e31a8b8298f16e1812c118616a84eb9b849 (diff) | |
| download | chawan-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.nim | 3 |
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 |