about summary refs log tree commit diff stats
path: root/buffer.nim
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.nim')
-rw-r--r--buffer.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffer.nim b/buffer.nim
index e6be7975..1897cdc4 100644
--- a/buffer.nim
+++ b/buffer.nim
@@ -298,7 +298,7 @@ proc cursorPrevWord*(buffer: Buffer): bool =
       fastRuneAt(buffer.rawtext[y], x, r, false)
 
   if x == 0:
-    if y < buffer.lastLine():
+    if y > 0:
       dec y
       x = buffer.rawtext[y].runeLen() - 1
   return buffer.cursorTo(x, y)