Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
4d26f334
Commit
4d26f334
authored
May 06, 2010
by
Leandro Melo
Browse files
Small change to the behaviour of the highlighter that should help it working with broken files.
parent
44202754
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/genericeditor/highlighter.cpp
View file @
4d26f334
...
...
@@ -422,8 +422,12 @@ void Highlighter::pushDynamicContext(const QSharedPointer<Context> &baseContext)
void
Highlighter
::
setCurrentContext
()
{
if
(
m_contexts
.
isEmpty
())
throw
HighlighterException
();
if
(
m_contexts
.
isEmpty
())
{
// This is not supposed to happen. However, there might be broken files (for example, the
// PHP definition) which will cause this behaviour. In such cases just pushing the default
// context is enough to keep highlighter working.
m_contexts
.
push_back
(
m_defaultContext
);
}
m_currentContext
=
m_contexts
.
back
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment