--- a/EditTextView.st Sat Sep 10 15:10:12 2016 +0200
+++ b/EditTextView.st Sun Sep 11 15:42:45 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -2144,22 +2142,29 @@
|wasOn nv nl|
cursorLine isNil ifTrue:[
- self setCursorLine:(firstLineShown + nFullLinesShown - 1).
+ 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.
- cursorVisibleLine notNil ifTrue:[
- nv := cursorVisibleLine - n.
- nv < 1 ifTrue:[
- self scrollUp:(nv negated + 1)
- ].
- ].
- self setValidatedCursorLine:nl col:cursorCol.
+ wasOn := self hideCursor.
+ cursorVisibleLine notNil ifTrue:[
+ nv := cursorVisibleLine - n.
+ nv < 1 ifTrue:[
+ self scrollUp:(nv negated + 1)
+ ].
+ ].
+ self setValidatedCursorLine:nl col:cursorCol.
"/ wasOn ifTrue:[self showCursor].
- self makeCursorVisibleAndShowCursor:wasOn.
+ self makeCursorVisibleAndShowCursor:wasOn.
]
"Modified: 22.5.1996 / 18:28:11 / cg"