TextView.st
changeset 860 61e18154a067
parent 848 f7189b5582b8
child 863 ed4282df00a0
equal deleted inserted replaced
859:6a07572ff0e0 860:61e18154a067
   563                 and:[(sel := sel at:1) size == 1]) ifTrue:[
   563                 and:[(sel := sel at:1) size == 1]) ifTrue:[
   564                     ch := sel at:1.
   564                     ch := sel at:1.
   565                     ('()[]{}<>' includes:ch) ifTrue:[
   565                     ('()[]{}<>' includes:ch) ifTrue:[
   566                         self searchForMatchingParenthesisFromLine:selectionStartLine col:selectionStartCol
   566                         self searchForMatchingParenthesisFromLine:selectionStartLine col:selectionStartCol
   567                               ifFound:[:line :col | 
   567                               ifFound:[:line :col | 
   568                                           |prevLine prevCol moveBack|
   568                                           |prevLine prevCol moveBack pos1|
   569 
   569 
   570                                           prevLine := firstLineShown.
   570                                           prevLine := firstLineShown.
   571                                           prevCol := leftOffset.
   571                                           prevCol := leftOffset.
   572                                           self selectFromLine:selectionStartLine col:selectionStartCol
   572                                           self selectFromLine:selectionStartLine col:selectionStartCol
   573                                                        toLine:line col:col.
   573                                                        toLine:line col:col.
   574 
   574 
   575                                           self sensor ctrlDown ifFalse:[
   575                                           self sensor ctrlDown ifFalse:[
   576                                               "/ undo scroll operation ...
   576                                               "/ undo scroll operation ...
   577                                               self withCursor:Cursor eye do:[  
   577                                               self withCursor:Cursor eye do:[  
       
   578                                                   moveBack := false.
   578                                                   (')]}>' includes:ch) ifTrue:[
   579                                                   (')]}>' includes:ch) ifTrue:[
   579                                                        (firstLineShown ~~ prevLine or:[prevCol ~~ leftOffset]) ifTrue:[
   580                                                        (firstLineShown ~~ prevLine or:[prevCol ~~ leftOffset]) ifTrue:[
   580                                                            moveBack := true
   581                                                            moveBack := true
   581                                                        ] 
   582                                                        ] 
   582                                                   ] ifFalse:[
   583                                                   ] ifFalse:[
   584                                                            self makeLineVisible:selectionEndLine.
   585                                                            self makeLineVisible:selectionEndLine.
   585                                                            moveBack := true
   586                                                            moveBack := true
   586                                                        ]
   587                                                        ]
   587                                                   ].
   588                                                   ].
   588                                                   moveBack ifTrue:[
   589                                                   moveBack ifTrue:[
       
   590                                                        pos1 := x@y. 
   589                                                        Delay waitForSeconds:MatchDelayTime. 
   591                                                        Delay waitForSeconds:MatchDelayTime. 
   590                                                        [self sensor anyButtonPressed] whileTrue:[
   592                                                         
   591                                                             Delay waitForSeconds:MatchDelayTime.
   593                                                        [self sensor hasUserEventFor:self] whileFalse:[
       
   594                                                             Delay waitForSeconds:MatchDelayTime / 2.
   592                                                        ].
   595                                                        ].
   593                                                        self scrollToLine:prevLine; scrollToCol:prevCol.
   596                                                        self scrollToLine:prevLine; scrollToCol:prevCol.
   594                                                   ].
   597                                                   ].
   595                                               ]
   598                                               ]
   596                                           ]
   599                                           ]
   629         ]
   632         ]
   630     ] ifFalse:[
   633     ] ifFalse:[
   631         super buttonMultiPress:button x:x y:y
   634         super buttonMultiPress:button x:x y:y
   632     ]
   635     ]
   633 
   636 
   634     "Modified: 21.10.1996 / 11:39:34 / cg"
   637     "Modified: 1.11.1996 / 17:13:50 / cg"
   635 !
   638 !
   636 
   639 
   637 buttonPress:button x:x y:y
   640 buttonPress:button x:x y:y
   638     "mouse-click - prepare for selection change"
   641     "mouse-click - prepare for selection change"
   639 
   642 
  2265 ! !
  2268 ! !
  2266 
  2269 
  2267 !TextView class methodsFor:'documentation'!
  2270 !TextView class methodsFor:'documentation'!
  2268 
  2271 
  2269 version
  2272 version
  2270     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.68 1996-10-21 10:41:05 cg Exp $'
  2273     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.69 1996-11-01 16:33:42 cg Exp $'
  2271 ! !
  2274 ! !