#REFACTORING by cg
class: TextView
scroll actions refactored/cleaned up
to not mix line scrolling (textViews)
with pixel scrolling (wheel + drag and drop)
changed:
#scrollSelectLeft
#scrollSelectRight
--- a/TextView.st Wed Jun 13 22:59:49 2018 +0200
+++ b/TextView.st Wed Jun 13 23:00:17 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -3174,10 +3176,17 @@
"make new selection immediately visible"
prevStartLine := selectionStartLine.
selectionStartCol := selectionStartCol - 1 max:1.
- self scrollLeft.
+ true "false" ifTrue:[
+ self selectionChanged. self repairDamage.
+ self scrollLeft. self repairDamage.
+ ] ifFalse:[
+ self scrollLeft.
+ self selectionChanged.
+ ].
autoScrollBlock notNil ifTrue:[ Processor addTimedBlock:autoScrollBlock afterSeconds:autoScrollDeltaT ].
- self selectionChanged.
+
+ "Modified: / 13-06-2018 / 22:54:24 / Claus Gittinger"
!
scrollSelectRight
@@ -3204,13 +3213,13 @@
].
].
- self selectionChanged.
- self scrollRight.
- "/ self repairDamage.
+ self selectionChanged. false ifTrue:[ self repairDamage ].
+ self scrollRight. false ifTrue:[ self repairDamage ].
autoScrollBlock notNil ifTrue:[ Processor addTimedBlock:autoScrollBlock afterSeconds:autoScrollDeltaT ].
"Modified: / 05-08-2010 / 21:25:56 / cg"
+ "Modified: / 13-06-2018 / 22:52:49 / Claus Gittinger"
!
scrollSelectUp