diff --git a/library/sketch/SKETCH-EDIT b/library/sketch/SKETCH-EDIT
index f910a3ce..998a52ec 100644
--- a/library/sketch/SKETCH-EDIT
+++ b/library/sketch/SKETCH-EDIT
@@ -1,11 +1,11 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED " 1-Dec-2025 23:22:35" {WMEDLEY}<library>SKETCH>SKETCH-EDIT.;20 113366 
+(FILECREATED " 2-Dec-2025 10:03:57" {WMEDLEY}<library>SKETCH>SKETCH-EDIT.;21 113506 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS \SKED.INSERT.UNDO \SKED.INSERT.ACTION \SKED.INSERT.CHARS.TO.STR \SKED.INSERT 
-                       CHAR.BEGIN \SKED.ARROWKEYS)
+      :CHANGES-TO (FNS \SKED.ARROWKEYS \SKED.INSERT.UNDO \SKED.INSERT.ACTION 
+                       \SKED.INSERT.CHARS.TO.STR \SKED.INSERT CHAR.BEGIN)
                   (VARS SKETCH-EDITCOMS)
 
       :PREVIOUS-DATE "30-Nov-2025 08:45:15" {WMEDLEY}<library>SKETCH>SKETCH-EDIT.;17)
@@ -1073,7 +1073,7 @@
                              (CDR CONTROLCHARTAIL])
 
 (\SKED.ARROWKEYS
-  [LAMBDA (ACTION SKW SELECTION)                             (* ; "Edited  1-Dec-2025 22:24 by rmk")
+  [LAMBDA (ACTION SKW SELECTION)                             (* ; "Edited  2-Dec-2025 10:03 by rmk")
 
     (* ;; "Move the caret left/right/up/down according to the arrow keys")
 
@@ -1098,9 +1098,11 @@
                                 (SETQ CHAR# 1)
                          else (add CHAR# 1)))
                   (:LINE.UP (add LINE# -1)
-                            (SETQ CHAR# (CLOSEST.CHAR SKLEFT LINE# TEXTELT SKW)))
+                            (CL:UNLESS (ILESSP LINE# 1)
+                                (SETQ CHAR# (CLOSEST.CHAR SKLEFT LINE# TEXTELT SKW))))
                   (:LINE.DOWN (add LINE# 1)
-                              (SETQ CHAR# (CLOSEST.CHAR SKLEFT LINE# TEXTELT SKW)))
+                              (CL:UNLESS (IGREATERP LINE# (LENGTH LINES))
+                                  (SETQ CHAR# (CLOSEST.CHAR SKLEFT LINE# TEXTELT SKW))))
                   (SHOULDNT))
               (CL:WHEN (<= 1 LINE# (LENGTH LINES))
                   (SKED.SELECTION.FEEDBACK SKW)
@@ -1929,17 +1931,17 @@ SKED.CLEAR.SELECTION 23612 . 24135) (SKETCH.CLEANUP 24137 . 26051) (SK.ENTER.EDI
 ) (SKED.REMOVE.OTHER.SELECTIONS 27600 . 28027) (SKED.EXTEND.SELECTION 28029 . 29494) (
 SKED.MOVE.SELECTION 29496 . 34566) (CREATE.TEXT.SELECTION 34568 . 35084) (SKED.SELECTION.FEEDBACK 
 35086 . 36742) (SKED.SET.EXTENDSELECTION 36744 . 37061) (SKED.SET.SELECTION 37063 . 37463) (LINE.BEGIN
- 37465 . 38019) (SELECTION.GREATERP 38021 . 38816) (SK.GETSYNTAX 38818 . 39633)) (40480 90869 (
+ 37465 . 38019) (SELECTION.GREATERP 38021 . 38816) (SK.GETSYNTAX 38818 . 39633)) (40480 91009 (
 WB.EDITOR 40490 . 41871) (SK.TTYENTRYFN 41873 . 42413) (SK.TTYEXITFN 42415 . 42941) (SKED.INSERT 42943
- . 43371) (\SKED.INSERT 43373 . 62845) (\SKED.ARROWKEYS 62847 . 65302) (\SKED.INSERT.ACTION 65304 . 
-65748) (\SKED.INSERT.UNDO 65750 . 68291) (FIRST.N.ELEMENTS 68293 . 68560) (SKED.CREATE.NEW.TEXTBOX 
-68562 . 75091) (SKED.CHARACTERPOSITION 75093 . 75880) (SKED.LINE.AND.CHAR# 75882 . 77513) (
-\SKED.DELETE.WORD.FROM.STRING 77515 . 78679) (\SKED.INSERT.CHARS.TO.STR 78681 . 87251) (JOINCHARS 
-87253 . 87640) (STRINGFROMCHARACTERS 87642 . 87967) (GETALLCHARS 87969 . 88310) (CLEANUP.EDIT 88312 . 
-88764) (SKED.NEW.TEXTELT 88766 . 90867)) (90908 111916 (MAP.SCREEN.POSITION.ONTO.GRID 90918 . 92367) (
-NEAREST.ON.GRID 92369 . 92913) (SK.MIDDLE.TITLEFN 92915 . 94858) (WB.BUTTON.HANDLER 94860 . 102682) (
-WB.ADD.NEW.POINT 102684 . 106013) (WB.DRAWLINE 106015 . 110249) (WB.RUBBERBAND.POSITION 110251 . 
-111168) (SK.RUBBERBAND.FEEDBACKFN 111170 . 111674) (RESET.LINE.BEING.INPUT 111676 . 111914)) (112102 
-113343 (NEAREST.EXISTING.POSITION 112112 . 112314) (WB.NEARPT 112316 . 113201) (LASTMOUSEPOSITION 
-113203 . 113341)))))
+ . 43371) (\SKED.INSERT 43373 . 62845) (\SKED.ARROWKEYS 62847 . 65442) (\SKED.INSERT.ACTION 65444 . 
+65888) (\SKED.INSERT.UNDO 65890 . 68431) (FIRST.N.ELEMENTS 68433 . 68700) (SKED.CREATE.NEW.TEXTBOX 
+68702 . 75231) (SKED.CHARACTERPOSITION 75233 . 76020) (SKED.LINE.AND.CHAR# 76022 . 77653) (
+\SKED.DELETE.WORD.FROM.STRING 77655 . 78819) (\SKED.INSERT.CHARS.TO.STR 78821 . 87391) (JOINCHARS 
+87393 . 87780) (STRINGFROMCHARACTERS 87782 . 88107) (GETALLCHARS 88109 . 88450) (CLEANUP.EDIT 88452 . 
+88904) (SKED.NEW.TEXTELT 88906 . 91007)) (91048 112056 (MAP.SCREEN.POSITION.ONTO.GRID 91058 . 92507) (
+NEAREST.ON.GRID 92509 . 93053) (SK.MIDDLE.TITLEFN 93055 . 94998) (WB.BUTTON.HANDLER 95000 . 102822) (
+WB.ADD.NEW.POINT 102824 . 106153) (WB.DRAWLINE 106155 . 110389) (WB.RUBBERBAND.POSITION 110391 . 
+111308) (SK.RUBBERBAND.FEEDBACKFN 111310 . 111814) (RESET.LINE.BEING.INPUT 111816 . 112054)) (112242 
+113483 (NEAREST.EXISTING.POSITION 112252 . 112454) (WB.NEARPT 112456 . 113341) (LASTMOUSEPOSITION 
+113343 . 113481)))))
 STOP
diff --git a/library/sketch/SKETCH-EDIT.LCOM b/library/sketch/SKETCH-EDIT.LCOM
index b4a6f2dd..9f6a8cd7 100644
Binary files a/library/sketch/SKETCH-EDIT.LCOM and b/library/sketch/SKETCH-EDIT.LCOM differ
