when clicking on a parenthesis (to see the corresponding),
stay at the other position, until the mouse-button is released.
--- a/TextView.st Fri Oct 18 15:54:46 1996 +0200
+++ b/TextView.st Mon Oct 21 12:41:05 1996 +0200
@@ -565,27 +565,33 @@
('()[]{}<>' includes:ch) ifTrue:[
self searchForMatchingParenthesisFromLine:selectionStartLine col:selectionStartCol
ifFound:[:line :col |
- |prevLine prevCol|
+ |prevLine prevCol moveBack|
prevLine := firstLineShown.
prevCol := leftOffset.
self selectFromLine:selectionStartLine col:selectionStartCol
toLine:line col:col.
+
self sensor ctrlDown ifFalse:[
"/ undo scroll operation ...
self withCursor:Cursor eye do:[
(')]}>' includes:ch) ifTrue:[
(firstLineShown ~~ prevLine or:[prevCol ~~ leftOffset]) ifTrue:[
- Delay waitForSeconds:MatchDelayTime.
- self scrollToLine:prevLine; scrollToCol:prevCol.
+ moveBack := true
]
] ifFalse:[
selectionEndLine > (firstLineShown + nFullLinesShown) ifTrue:[
self makeLineVisible:selectionEndLine.
- Delay waitForSeconds:MatchDelayTime.
- self scrollToLine:prevLine; scrollToCol:prevCol.
+ moveBack := true
]
- ]
+ ].
+ moveBack ifTrue:[
+ Delay waitForSeconds:MatchDelayTime.
+ [self sensor anyButtonPressed] whileTrue:[
+ Delay waitForSeconds:MatchDelayTime.
+ ].
+ self scrollToLine:prevLine; scrollToCol:prevCol.
+ ].
]
]
]
@@ -625,7 +631,7 @@
super buttonMultiPress:button x:x y:y
]
- "Modified: 28.5.1996 / 16:58:53 / cg"
+ "Modified: 21.10.1996 / 11:39:34 / cg"
!
buttonPress:button x:x y:y
@@ -2261,5 +2267,5 @@
!TextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.67 1996-10-15 11:27:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.68 1996-10-21 10:41:05 cg Exp $'
! !