--- a/BrowserView.st Tue May 25 16:36:27 1999 +0200
+++ b/BrowserView.st Wed May 26 13:14:38 1999 +0200
@@ -12587,64 +12587,69 @@
If there have been no modifications in the meantime,
install it."
- |firstShown lastShown sensor cursorWasOn|
+ |firstShown lastShown sensor cursorWasOn anyChange|
codeView modified ifTrue:[
- "/ new input arrived in the meantime
- ^ self
+ "/ new input arrived in the meantime
+ ^ self
].
coloringProcess notNil ifTrue:[
- "/ another coloring process has already been started.
- "/ ignore this (leftover) code.
- ^ self
+ "/ another coloring process has already been started.
+ "/ ignore this (leftover) code.
+ ^ self
].
currentMethod isNil ifTrue:[
- "/ have already switched to some other method,
- "/ or closed.
- ^ self
+ "/ have already switched to some other method,
+ "/ or closed.
+ ^ self
].
firstShown := codeView firstLineShown.
lastShown := codeView lastLineShown.
sensor := self sensor.
- cursorWasOn := codeView hideCursor.
+ anyChange := false.
newCode asStringCollection keysAndValuesDo:[:lNr :line |
- |oldLine|
-
- oldLine := codeView listAt:lNr.
- oldLine notNil ifTrue:[
- line notNil ifTrue:[
- "/ this check is needed - there is a race
- "/ when the text is converted. This detects the
- "/ resulting error.
- "/ Certainly a kludge.
-
- oldLine string = line string ifTrue:[
- oldLine emphasis ~= line emphasis ifTrue:[
- codeView withoutRedrawAt:lNr put:line.
- (lNr between:firstShown and:lastShown) ifTrue:[
- codeView redrawLine:lNr.
- ]
- ]
+ |oldLine|
+
+ oldLine := codeView listAt:lNr.
+ oldLine notNil ifTrue:[
+ line notNil ifTrue:[
+ "/ this check is needed - there is a race
+ "/ when the text is converted. This detects the
+ "/ resulting error.
+ "/ Certainly a kludge.
+
+ oldLine string = line string ifTrue:[
+ oldLine emphasis ~= line emphasis ifTrue:[
+ codeView withoutRedrawAt:lNr put:line.
+ (lNr between:firstShown and:lastShown) ifTrue:[
+ anyChange ifFalse:[
+ anyChange := true.
+ cursorWasOn := codeView hideCursor
+ ].
+'r' printCR.
+ codeView redrawLine:lNr.
+ ]
+ ]
"/ ] ifFalse:[
"/ oldLine string printCR.
"/ line string printCR.
- ]
- ]
- ].
-
- "/ stop when keyboard input arrives ...
- (sensor hasUserEvents) ifTrue:[
- (sensor hasKeyPressEventFor:nil) ifTrue:[
- cursorWasOn ifTrue:[codeView showCursor].
- ^ self.
- ]
- ]
- ].
- cursorWasOn ifTrue:[codeView showCursor].
+ ]
+ ]
+ ].
+
+ "/ stop when keyboard input arrives ...
+ (sensor hasUserEvents) ifTrue:[
+ (sensor hasKeyPressEventFor:nil) ifTrue:[
+ (anyChange and:[cursorWasOn]) ifTrue:[codeView showCursor].
+ ^ self.
+ ]
+ ]
+ ].
+ (anyChange and:[cursorWasOn]) ifTrue:[codeView showCursor].
"Modified: / 5.2.1999 / 22:29:17 / cg"
! !
@@ -13529,6 +13534,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.504 1999-05-20 16:41:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.505 1999-05-26 11:14:38 cg Exp $'
! !
BrowserView initialize!