EditTextView.st
branchjv
changeset 5851 4826a8e601e7
parent 5839 2cdb82875bf2
parent 5850 988655795073
child 5867 ae5f44ecba6e
--- a/EditTextView.st	Sun Sep 11 06:53:06 2016 +0200
+++ b/EditTextView.st	Mon Sep 12 06:57:55 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
@@ -2214,7 +2212,14 @@
         self setCursorLine:(firstLineShown + nFullLinesShown - 1).
     ].
     nl := cursorLine - n.
-    nl < 1 ifTrue:[nl := 1].
+    nl < 1 ifTrue:[
+        |scrollAboveTopHandler|
+        
+        (scrollAboveTopHandler := self getAttribute:#scrollAboveTopHandler) notNil ifTrue:[
+            nl := scrollAboveTopHandler value:nl
+        ].    
+        nl := nl max:1
+    ].
 
     (nl ~~ cursorLine) ifTrue: [
         wasOn := self hideCursor.