checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 14 Aug 1997 17:12:10 +0200
changeset 1303 6e2aa19c1aed
parent 1302 ed8d5b631f93
child 1304 173d00c195f9
checkin from browser
TextView.st
--- a/TextView.st	Wed Aug 13 17:30:09 1997 +0200
+++ b/TextView.st	Thu Aug 14 17:12:10 1997 +0200
@@ -397,11 +397,26 @@
 !TextView methodsFor:'accessing'!
 
 characterPositionOfSelection
-    "return the character index of the first character in the selection"
-
-    selectionStartLine isNil ifTrue:[^ 1].
+    "return the character index of the first character in the selection.
+     Returns 0 if there is no selection."
+
+    selectionStartLine isNil ifTrue:[^ 0].
     ^ self characterPositionOfLine:selectionStartLine
-			       col:selectionStartCol
+                               col:selectionStartCol
+
+    "Modified: 14.8.1997 / 16:35:37 / cg"
+!
+
+characterPositionOfSelectionEnd
+    "return the character index of the last character in the selection.
+     Returns 0 if there is no selection."
+
+    selectionStartLine isNil ifTrue:[^ 0].
+    ^ self characterPositionOfLine:selectionEndLine
+                               col:selectionEndCol
+
+    "Created: 14.8.1997 / 16:35:24 / cg"
+    "Modified: 14.8.1997 / 16:35:45 / cg"
 !
 
 contentsWasSaved
@@ -2494,5 +2509,5 @@
 !TextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.99 1997-07-31 17:16:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.100 1997-08-14 15:12:10 cg Exp $'
 ! !