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 ] |