about summary refs log tree commit diff stats
path: root/edit.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-08-28 17:29:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-08-28 17:29:26 -0700
commit5513bd56a05adb080e1d64dd65c1a1df0aa06a19 (patch)
tree50605104233e6c217f07a31b0830c616b4edc75e /edit.mu
parent57bfcad029b8705fb06dd0e67a03fd6040e4ffab (diff)
downloadmu-5513bd56a05adb080e1d64dd65c1a1df0aa06a19.tar.gz
2093
Diffstat (limited to 'edit.mu')
-rw-r--r--edit.mu12
1 files changed, 6 insertions, 6 deletions
diff --git a/edit.mu b/edit.mu
index 03317273..41317db7 100644
--- a/edit.mu
+++ b/edit.mu
@@ -1807,10 +1807,10 @@ after +handle-special-key [
     move-to-next-character?:boolean <- equal *k, 65514/right-arrow
     break-unless move-to-next-character?
     # if not at end of text
-    old-cursor:address:duplex-list <- next-duplex *before-cursor
-    break-unless old-cursor
+    next-cursor:address:duplex-list <- next-duplex *before-cursor
+    break-unless next-cursor
     # scan to next character
-    *before-cursor <- copy old-cursor
+    *before-cursor <- copy next-cursor
     # if crossed a newline, move cursor to start of next row
     {
       old-cursor-character:character <- get **before-cursor, value:offset
@@ -1832,9 +1832,9 @@ after +handle-special-key [
       at-wrap?:boolean <- equal *cursor-column, wrap-column
       break-unless at-wrap?
       # and if next character isn't newline
-      new-cursor:address:duplex-list <- next-duplex old-cursor
-      break-unless new-cursor
-      next-character:character <- get *new-cursor, value:offset
+      next:address:duplex-list <- next-duplex *before-cursor
+      break-unless next
+      next-character:character <- get *next, value:offset
       newline?:boolean <- equal next-character, 10/newline
       break-if newline?
       *cursor-row <- add *cursor-row, 1