From 2f8edaffdcf22b90389d214b730ea9e28a3b2e5a Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 18 Sep 2023 20:34:01 +0200 Subject: lineedit: fix a display bug The editor box never uses the last cell. However, it should still overwrite it. --- src/display/lineedit.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit