about summary refs log tree commit diff stats
path: root/src/local/pager.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/local/pager.nim')
-rw-r--r--src/local/pager.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim
index 5f345a3a..005fefa5 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -330,12 +330,12 @@ proc drawBuffer*(pager: Pager, container: Container, ostream: Stream) =
       var i = 0
       var s = ""
       for f in line.formats:
-        var outstr = ""
+        let si = i
         while x < f.pos:
           var r: Rune
           fastRuneAt(line.str, i, r)
-          outstr &= r
           x += r.width()
+        let outstr = line.str.substr(si, i - 1)
         s &= pager.term.processOutputString(outstr, w)
         s &= pager.term.processFormat(format, f.format)
       if i < line.str.len: