changed:
authorStefan Vogel <sv@exept.de>
Sun, 12 Aug 2012 00:20:22 +0200
changeset 11741 3b6f1c31139f
parent 11740 fa674978dc41
child 11742 1d85e2ea8875
changed: #elementAtLine:col: #highlightElementAtLine:col:
Tools__CodeNavigationService.st
--- a/Tools__CodeNavigationService.st	Fri Aug 10 20:34:12 2012 +0200
+++ b/Tools__CodeNavigationService.st	Sun Aug 12 00:20:22 2012 +0200
@@ -349,6 +349,9 @@
 
     characterPosition := textView characterPositionOfLine:line col:col.
     syntaxElements := codeView syntaxElements.
+    syntaxElements isEmptyOrNil ifTrue:[
+        ^ nil.
+    ].
     index := syntaxElements indexForInserting:characterPosition.
     index > syntaxElements size ifTrue:[^nil].
     element := syntaxElements at:index ifAbsent:nil.
@@ -466,6 +469,7 @@
 
     characterPosition := textView characterPositionOfLine:line col:col.
     syntaxElements := codeView syntaxElements.
+    syntaxElements isEmptyOrNil ifTrue:[self highlightElement:nil. ^ self].
     index := syntaxElements indexForInserting:characterPosition.
     index > syntaxElements size ifTrue:[self highlightElement:nil. ^ self].
     element := syntaxElements at:index.
@@ -595,7 +599,7 @@
 !CodeNavigationService class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.17 2012-08-10 18:34:12 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.18 2012-08-11 22:20:22 stefan Exp $'
 !
 
 version_SVN