about summary refs log tree commit diff stats
path: root/src/buffer/buffer.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer/buffer.nim')
-rw-r--r--src/buffer/buffer.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer/buffer.nim b/src/buffer/buffer.nim
index 6c2654dd..40527d94 100644
--- a/src/buffer/buffer.nim
+++ b/src/buffer/buffer.nim
@@ -770,7 +770,7 @@ proc runBuffer(buffer: Buffer, istream, ostream: Stream) =
         istream.sread(wrap)
         let match = buffer.findPrevMatch(regex, cx, cy, wrap)
         if match.success:
-          buffer.writeCommand(JUMP, match.x, match.y)
+          buffer.writeCommand(JUMP, match.x, match.y, match.x + match.str.width() - 1)
       of FIND_NEXT_MATCH:
         var cx, cy: int
         var regex: Regex
@@ -781,7 +781,7 @@ proc runBuffer(buffer: Buffer, istream, ostream: Stream) =
         istream.sread(wrap)
         let match = buffer.findNextMatch(regex, cx, cy, wrap)
         if match.success:
-          buffer.writeCommand(JUMP, match.x, match.y)
+          buffer.writeCommand(JUMP, match.x, match.y, match.x + match.str.width() - 1)
       of READ_SUCCESS:
         var s: string
         istream.sread(s)