diff options
Diffstat (limited to 'src/io/lineedit.nim')
-rw-r--r-- | src/io/lineedit.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/io/lineedit.nim b/src/io/lineedit.nim index eb812122..a12604cb 100644 --- a/src/io/lineedit.nim +++ b/src/io/lineedit.nim @@ -94,10 +94,12 @@ proc generateOutput*(edit: LineEdit): FixedGrid = for r in os: result[x].str = "*" x += r.lwidth() + if x > result.width: break else: for r in os: result[x].str &= $r x += r.lwidth() + if x > result.width: break proc getCursorX*(edit: LineEdit): int = return edit.promptw + edit.news.lwidth(edit.shift, edit.cursor) |