diff options
Diffstat (limited to 'src/display/pager.nim')
-rw-r--r-- | src/display/pager.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display/pager.nim b/src/display/pager.nim index 45386376..95057978 100644 --- a/src/display/pager.nim +++ b/src/display/pager.nim @@ -302,7 +302,8 @@ proc drawBuffer*(pager: Pager, container: Container, ostream: Stream) = x += r.width() s &= pager.term.processOutputString(outstr, w) s &= pager.term.processFormat(format, f.format) - s &= pager.term.processOutputString(line.str.substr(i), w) + if i < line.str.len: + s &= pager.term.processOutputString(line.str.substr(i), w) s &= pager.term.processFormat(format, newFormat()) & "\n" ostream.write(s)) ostream.flush() |