--- a/Tools__CodeHighlightingService.st Thu Oct 16 13:05:41 2014 +0200
+++ b/Tools__CodeHighlightingService.st Thu Oct 16 16:26:14 2014 +0200
@@ -294,11 +294,18 @@
|firstShown lastShown cursorWasOn anyChange newLines l replaceAction list|
- "textView" modified ifTrue:[
- "/ new input arrived in the meantime
+ "/ It may happen that service is unregistered while
+ "/ an user event for #setHighlightedCode:elements: is already in
+ "/ an event queue but not yet processed. To handle this situation.
+ "/ check if textView is nil (which is in case the service is unregistered)
+ textView isNil ifTrue:[ ^ self ].
- ^ self
+
+ modified ifTrue:[
+ "/ a new input arrived in the meantime
+ ^ self
].
+
done ifFalse:[
"/ another coloring process has already been started.
"/ ignore this (leftover) code.
@@ -378,20 +385,20 @@
"Created: / 14-02-2010 / 16:10:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified (format): / 21-08-2011 / 09:38:22 / cg"
"Modified: / 01-02-2012 / 19:18:00 / jv"
- "Modified: / 17-03-2012 / 19:33:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-10-2014 / 12:28:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CodeHighlightingService class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.49 2014-06-10 17:00:16 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.50 2014-10-16 14:26:14 vrany Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.49 2014-06-10 17:00:16 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.50 2014-10-16 14:26:14 vrany Exp $'
!
version_SVN
- ^ '$Id: Tools__CodeHighlightingService.st,v 1.49 2014-06-10 17:00:16 vrany Exp $'
+ ^ '$Id: Tools__CodeHighlightingService.st,v 1.50 2014-10-16 14:26:14 vrany Exp $'
! !