Tools__CodeHighlightingService.st
changeset 10634 9db32390ac37
parent 10497 aab867178a6f
child 10644 02846c439aa8
--- a/Tools__CodeHighlightingService.st	Sun Aug 21 12:25:51 2011 +0200
+++ b/Tools__CodeHighlightingService.st	Sun Aug 21 12:26:18 2011 +0200
@@ -178,73 +178,73 @@
 
     |firstShown lastShown cursorWasOn anyChange newLines l replaceAction list|
 
+    textView modified ifTrue:[
+        "/ new input arrived in the meantime
 
-    textView modified ifTrue:[
-	"/ new input arrived in the meantime
-
-	^ self
+        ^ self
     ].
     done  ifFalse:[
-	"/ another coloring process has already been started.
-	"/ ignore this (leftover) code.
-	^ self
+        "/ another coloring process has already been started.
+        "/ ignore this (leftover) code.
+        ^ self
     ].
     firstShown := textView firstLineShown.
     lastShown := textView lastLineShown.
+
     replaceAction := [:lNr :line |
-	    |oldLine|
+            |oldLine|
 
-	    oldLine := list at:lNr ifAbsent:nil.
-	    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 := list at:lNr ifAbsent:nil.
+            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:[
-			    textView modifiedChannel removeDependent:self.
-			    list at:lNr put:line.
-			    textView modifiedChannel addDependent:self.
-			    (lNr between:firstShown and:lastShown) ifTrue:[
-				anyChange ifFalse:[
-				    anyChange := true.
-				    cursorWasOn := textView hideCursor
-				].
-				textView redrawLine:lNr
-			    ]
-			]
-		    ]
-		]
-	    ]
-	].
+                    oldLine string = line string ifTrue:[
+                        oldLine emphasis ~= line emphasis ifTrue:[
+                            textView modifiedChannel removeDependent:self.
+                            list at:lNr put:line.
+                            textView modifiedChannel addDependent:self.
+                            (lNr between:firstShown and:lastShown) ifTrue:[
+                                anyChange ifFalse:[
+                                    anyChange := true.
+                                    cursorWasOn := textView hideCursor
+                                ].
+                                textView redrawLine:lNr
+                            ]
+                        ]
+                    ]
+                ]
+            ]
+        ].
 
     anyChange := false.
     newLines := newCode asStringCollection.
     list := textView list.
     list isNil ifTrue:[
-	textView list:newLines.
+        textView list:newLines.
     ] ifFalse:[
-	"/ the cursor line first - that's where your eyes are ...
-	(l := textView cursorLine) notNil ifTrue:[
-	    l <= newLines size ifTrue:[
-		replaceAction value:l value:(newLines at:l)
-	    ]
-	].
-	newLines keysAndValuesDo:replaceAction.
-	anyChange ifTrue:[
-	    cursorWasOn ifTrue:[
-		textView showCursor
-	    ]
-	]
+        "/ the cursor line first - that's where your eyes are ...
+        (l := textView cursorLine) notNil ifTrue:[
+            l <= newLines size ifTrue:[
+                replaceAction value:l value:(newLines at:l)
+            ]
+        ].
+        newLines keysAndValuesDo:replaceAction.
+        anyChange ifTrue:[
+            cursorWasOn ifTrue:[
+                textView showCursor
+            ]
+        ]
     ].
     codeView syntaxElements: elements
 
     "Modified: / 09-10-2006 / 11:50:17 / cg"
     "Created: / 14-02-2010 / 16:10:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (format): / 06-07-2011 / 18:21:12 / cg"
     "Modified: / 29-07-2011 / 11:10:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (format): / 21-08-2011 / 09:38:22 / cg"
 !
 
 showInfo: aString
@@ -393,11 +393,11 @@
 !CodeHighlightingService class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.17 2011-08-05 12:31:54 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.18 2011-08-21 10:26:18 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.17 2011-08-05 12:31:54 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.18 2011-08-21 10:26:18 cg Exp $'
 !
 
 version_SVN