Fix: hang in syntax highlighter
SqlLexer was changed to correctly report end of file. Which this code didn't handle
This commit is contained in:
parent
27fde22d54
commit
6acf70660b
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ void SqlSyntaxHighlighter::highlightBlock(const QString &text)
|
|||
int startpos, length;
|
||||
BasicTokenType tokentype;
|
||||
QString s;
|
||||
while (lexer.nextBasicToken(startpos, length, tokentype, s)) {
|
||||
while (lexer.nextBasicToken(startpos, length, tokentype, s) && tokentype != BasicTokenType::End) {
|
||||
switch (tokentype) {
|
||||
case BasicTokenType::None:
|
||||
case BasicTokenType::End: // End of input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue