SelectionInListModelView.st
changeset 2671 bba7717907bb
parent 2670 27dacfff1d6d
child 2701 d95a0a764f4d
--- a/SelectionInListModelView.st	Thu Mar 04 10:33:47 2004 +0100
+++ b/SelectionInListModelView.st	Fri Mar 05 10:33:49 2004 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1999 by eXept Software AG
               All Rights Reserved
@@ -1624,12 +1622,25 @@
         super keyPress:aKey x:x y:y.
         ^ self
     ].
-
     shifted := (multipleSelectOk and:[self sensor shiftDown]).
     self cursorEntersItem:nil.
 
-    aKey == #CursorDown ifTrue:[ step :=  1 ]
-                       ifFalse:[ step := -1 ].
+    aKey == #CursorDown ifTrue:[ step :=  1.]
+                       ifFalse:[ step := -1.].
+
+    shifted ifFalse:[ |compressed|
+        compressed := self sensor compressKeyPressEventsWithKey:aKey.
+
+        compressed ~~ 0 ifTrue:[
+            aKey == #CursorDown ifTrue:[
+                lineNr := lineNr + compressed.
+                lineNr > listSize ifTrue:[lineNr := 1].
+            ] ifFalse:[
+                lineNr := lineNr - compressed.
+                lineNr < 1 ifTrue:[lineNr := listSize].
+            ].
+        ].
+    ].
     start  := lineNr.
     lineNr := lineNr + step.
 
@@ -2328,5 +2339,5 @@
 !SelectionInListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.97 2004-03-04 09:33:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.98 2004-03-05 09:33:49 ca Exp $'
 ! !