summaryrefslogtreecommitdiffstats
path: root/kate/part/katehighlight.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kate/part/katehighlight.cpp')
-rw-r--r--kate/part/katehighlight.cpp37
1 files changed, 21 insertions, 16 deletions
diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp
index 8c6ce36e5..1adbba2d5 100644
--- a/kate/part/katehighlight.cpp
+++ b/kate/part/katehighlight.cpp
@@ -2438,28 +2438,33 @@ void KateHighlighting::makeContextList()
buildPrefix=it.key()+':'; // attribute names get prefixed by the names
// of the highlighting definitions they belong to
- if (identifierToUse.isEmpty() )
+ if (identifierToUse.isEmpty())
+ {
kdDebug(13010)<<"OHOH, unknown highlighting description referenced"<<endl;
-
- kdDebug(13010)<<"setting ("<<it.key()<<") to loaded"<<endl;
-
- //mark hl as loaded
- it=embeddedHls.insert(it.key(),KateEmbeddedHlInfo(true,startctx));
- //set class member for context 0 offset, so we don't need to pass it around
- buildContext0Offset=startctx;
- //parse one hl definition file
- startctx=addToContextList(identifierToUse,startctx);
-
- if (noHl) return; // an error occurred
-
- base_startctx = startctx;
- something_changed=true; // something has been loaded
+ kdDebug(13010)<<"Highlighting for ("<<it.key()<<") can not be loaded"<<endl;
+ }
+ else
+ {
+ // Only do this if we have a non-empty identifier
+ kdDebug(13010)<<"setting ("<<it.key()<<") to loaded"<<endl;
+
+ //mark hl as loaded
+ it=embeddedHls.insert(it.key(),KateEmbeddedHlInfo(true,startctx));
+ //set class member for context 0 offset, so we don't need to pass it around
+ buildContext0Offset=startctx;
+ //parse one hl definition file
+ startctx=addToContextList(identifierToUse,startctx);
+
+ if (noHl) return; // an error occurred
+
+ base_startctx = startctx;
+ something_changed=true; // something has been loaded
+ }
}
}
} while (something_changed); // as long as there has been another file parsed
// repeat everything, there could be newly added embedded hls.
-
// at this point all needed highlighing (sub)definitions are loaded. It's time
// to resolve cross file references (if there are any)
kdDebug(13010)<<"Unresolved contexts, which need attention: "<<unresolvedContextReferences.count()<<endl;