Do not reurn lineNumbers < 1 in #visibleLineOfY:
authorStefan Vogel <sv@exept.de>
Fri, 13 Feb 1998 22:56:03 +0100
changeset 1448 4220c80ab099
parent 1447 9319cafbf258
child 1449 2a54bdfff203
Do not reurn lineNumbers < 1 in #visibleLineOfY: (happens after // has been fixed to truncate towards negative infinity).
ListView.st
--- a/ListView.st	Fri Feb 13 14:55:29 1998 +0100
+++ b/ListView.st	Fri Feb 13 22:56:03 1998 +0100
@@ -2025,7 +2025,9 @@
     "given a y-coordinate, return lineNr
      - works for fix-height fonts only"
 
-    ^ ((y - textStartTop) // fontHeight) + 1
+    ^ (((y - textStartTop) // fontHeight) + 1) max:1
+
+    "Modified: / 13.2.1998 / 20:57:26 / stefan"
 !
 
 visibleLineToAbsoluteLine:visibleLineNr
@@ -3768,5 +3770,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.147 1998-01-29 09:44:54 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.148 1998-02-13 21:56:03 stefan Exp $'
 ! !