diff --git a/library/tedit/TEDIT-SELECTION b/library/tedit/TEDIT-SELECTION
index 3d579285..ee2f3a0a 100644
--- a/library/tedit/TEDIT-SELECTION
+++ b/library/tedit/TEDIT-SELECTION
@@ -1,12 +1,12 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "16-Mar-2024 16:31:03" {MEDLEY}<library>tedit>TEDIT-SELECTION.;76 125706 
+(FILECREATED "21-Mar-2024 10:32:02" {MEDLEY}<library>tedit>TEDIT-SELECTION.;80 126882 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS \SELPIECES)
+      :CHANGES-TO (VARS TEDIT-SELECTIONCOMS)
 
-      :PREVIOUS-DATE " 5-Mar-2024 15:07:12" {MEDLEY}<library>tedit>TEDIT-SELECTION.;75)
+      :PREVIOUS-DATE "16-Mar-2024 16:31:03" {MEDLEY}<library>tedit>TEDIT-SELECTION.;79)
 
 
 (PRETTYCOMPRINT TEDIT-SELECTIONCOMS)
@@ -43,7 +43,7 @@
         
         (* ;; "User entries to the selection code")
 
-        (FNS TEDIT.GETPOINT TEDIT.GETSEL TEDIT.GETSEL.PARA TEDIT.MAKESEL TEDIT.SCANSEL 
+        (FNS TEDIT.XYTOCH TEDIT.GETPOINT TEDIT.GETSEL TEDIT.GETSEL.PARA TEDIT.MAKESEL TEDIT.SCANSEL 
              TEDIT.SET.SEL.LOOKS TEDIT.SETSEL TEDIT.SHOWSEL)
         
         (* ;; "SELPIECES")
@@ -1672,6 +1672,31 @@
 
 (DEFINEQ
 
+(TEDIT.XYTOCH
+  [LAMBDA (X Y PANE)                                         (* ; "Edited 20-Mar-2024 14:32 by rmk")
+
+    (* ;; "Returns the character number of the character at coordinates X and Y in PANE.")
+
+    (LET ((TEXTOBJ (TEXTOBJ PANE))
+          SEL)
+
+         (* ;; "The X W fields should be good in all panes, not sure about the Y W fields.  Maybe those are PANE-dependent.")
+
+         (SETQ X (SELECTQ X
+                     (LEFT (GETTOBJ TEXTOBJ WLEFT))
+                     (RIGHT (SUB1 (GETTOBJ TEXTOBJ WRIGHT)))
+                     X))
+         (SETQ Y (SELECTQ Y
+                     (TOP (SUB1 (GETTOBJ TEXTOBJ WTOP)))
+                     (BOTTOM (GETTOBJ TEXTOBJ WBOTTOM))
+                     Y))
+         (SETQ SEL (\TEDIT.SELECT.LINE.SCANNER X Y TEXTOBJ (fetch (TEXTWINDOW PLINES) of PANE)
+                          'TEXT NIL NIL PANE))
+         (CL:WHEN (AND (type? SELECTION SEL)
+                       (GETSEL SEL SET))                     (* ; 
+                                                        "He pointed at something real;  return that.")
+             (GETSEL SEL CH#))])
+
 (TEDIT.GETPOINT
   [LAMBDA (STREAM SEL)                                       (* ; "Edited  5-Jun-2023 15:30 by rmk")
                                                              (* ; "Edited 30-May-91 23:03 by jds")
@@ -2112,23 +2137,23 @@
               (SHOULDNT)) finally (RETURN RESULT])
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (12802 14667 (\TEDIT.SELECTION.DEFPRINT 12812 . 14665)) (14668 15789 (
-\TEDIT.SET.GLOBAL.SELECTIONS 14678 . 15787)) (15826 24061 (TEDIT.SEL.AS.STRING 15836 . 17423) (
-TEDIT.SEL.AS.SEXPR 17425 . 18411) (TEDIT.SELECTALL 18413 . 18743) (TEDIT.SELECTED.PIECES 18745 . 20089
-) (\TEDIT.FIND.PROTECTED.END 20091 . 21580) (\TEDIT.FIND.PROTECTED.START 21582 . 23396) (
-\TEDIT.WORD.BOUND 23398 . 24059)) (24195 55659 (\TEDIT.EXTEND.SEL 24205 . 31181) (\TEDIT.SELECT 31183
- . 32565) (\TEDIT.SCAN.LINE 32567 . 40568) (\TEDIT.SCAN.LINE.WORD 40570 . 44690) (
-\TEDIT.SELECT.LINE.SCANNER 44692 . 51741) (\TEDIT.SELECT.OBJECT 51743 . 55657)) (55660 70554 (\FIXSEL 
-55670 . 66192) (\TEDIT.CHTOX 66194 . 69181) (\TEDIT.COLLECTSELS 69183 . 70234) (\TEDIT.SELECTION.UNSET
- 70236 . 70552)) (70555 73694 (TEDIT.RESET.EXTEND.PENDING.DELETE 70565 . 71402) (\TEDIT.SET.SEL.LOOKS 
-71404 . 73692)) (73695 95076 (\SHOWSEL 73705 . 77423) (\TEDIT.SHOWSEL.HILIGHT 77425 . 80938) (
-\TEDIT.UPDATE.SHOWSEL 80940 . 87253) (\TEDIT.REFRESH.SHOWSEL 87255 . 89491) (\TEDIT.UPDATE.SEL 89493
- . 92615) (\TEDIT.SEL.L1 92617 . 92905) (\TEDIT.SEL.LN 92907 . 93195) (\TEDIT.SEL.DELETEDCHARS 93197
- . 95074)) (95077 98165 (\COPYSEL 95087 . 96775) (\TEDIT.SEL.CHANGED? 96777 . 98163)) (98218 108786 (
-TEDIT.GETPOINT 98228 . 99177) (TEDIT.GETSEL 99179 . 99499) (TEDIT.GETSEL.PARA 99501 . 100450) (
-TEDIT.MAKESEL 100452 . 101434) (TEDIT.SCANSEL 101436 . 102110) (TEDIT.SET.SEL.LOOKS 102112 . 102993) (
-TEDIT.SETSEL 102995 . 107961) (TEDIT.SHOWSEL 107963 . 108784)) (108814 125683 (\SELPIECES 108824 . 
-111917) (\SELPIECES.COPY 111919 . 113788) (\SELPIECES.CONCAT 113790 . 115663) (
-\SELPIECES.CHARTRANSFORM 115665 . 118685) (\SELPIECES.FROM.STRING 118687 . 123602) (
-\SELPIECES.TO.STRING 123604 . 125681)))))
+  (FILEMAP (NIL (12825 14690 (\TEDIT.SELECTION.DEFPRINT 12835 . 14688)) (14691 15812 (
+\TEDIT.SET.GLOBAL.SELECTIONS 14701 . 15810)) (15849 24084 (TEDIT.SEL.AS.STRING 15859 . 17446) (
+TEDIT.SEL.AS.SEXPR 17448 . 18434) (TEDIT.SELECTALL 18436 . 18766) (TEDIT.SELECTED.PIECES 18768 . 20112
+) (\TEDIT.FIND.PROTECTED.END 20114 . 21603) (\TEDIT.FIND.PROTECTED.START 21605 . 23419) (
+\TEDIT.WORD.BOUND 23421 . 24082)) (24218 55682 (\TEDIT.EXTEND.SEL 24228 . 31204) (\TEDIT.SELECT 31206
+ . 32588) (\TEDIT.SCAN.LINE 32590 . 40591) (\TEDIT.SCAN.LINE.WORD 40593 . 44713) (
+\TEDIT.SELECT.LINE.SCANNER 44715 . 51764) (\TEDIT.SELECT.OBJECT 51766 . 55680)) (55683 70577 (\FIXSEL 
+55693 . 66215) (\TEDIT.CHTOX 66217 . 69204) (\TEDIT.COLLECTSELS 69206 . 70257) (\TEDIT.SELECTION.UNSET
+ 70259 . 70575)) (70578 73717 (TEDIT.RESET.EXTEND.PENDING.DELETE 70588 . 71425) (\TEDIT.SET.SEL.LOOKS 
+71427 . 73715)) (73718 95099 (\SHOWSEL 73728 . 77446) (\TEDIT.SHOWSEL.HILIGHT 77448 . 80961) (
+\TEDIT.UPDATE.SHOWSEL 80963 . 87276) (\TEDIT.REFRESH.SHOWSEL 87278 . 89514) (\TEDIT.UPDATE.SEL 89516
+ . 92638) (\TEDIT.SEL.L1 92640 . 92928) (\TEDIT.SEL.LN 92930 . 93218) (\TEDIT.SEL.DELETEDCHARS 93220
+ . 95097)) (95100 98188 (\COPYSEL 95110 . 96798) (\TEDIT.SEL.CHANGED? 96800 . 98186)) (98241 109962 (
+TEDIT.XYTOCH 98251 . 99402) (TEDIT.GETPOINT 99404 . 100353) (TEDIT.GETSEL 100355 . 100675) (
+TEDIT.GETSEL.PARA 100677 . 101626) (TEDIT.MAKESEL 101628 . 102610) (TEDIT.SCANSEL 102612 . 103286) (
+TEDIT.SET.SEL.LOOKS 103288 . 104169) (TEDIT.SETSEL 104171 . 109137) (TEDIT.SHOWSEL 109139 . 109960)) (
+109990 126859 (\SELPIECES 110000 . 113093) (\SELPIECES.COPY 113095 . 114964) (\SELPIECES.CONCAT 114966
+ . 116839) (\SELPIECES.CHARTRANSFORM 116841 . 119861) (\SELPIECES.FROM.STRING 119863 . 124778) (
+\SELPIECES.TO.STRING 124780 . 126857)))))
 STOP
diff --git a/library/tedit/TEDIT-SELECTION.LCOM b/library/tedit/TEDIT-SELECTION.LCOM
index f5054fb1..6dd6155e 100644
Binary files a/library/tedit/TEDIT-SELECTION.LCOM and b/library/tedit/TEDIT-SELECTION.LCOM differ
