forked from qt-creator/qt-creator
SyntaxHighlighter: Fix crash when typing a quote at line end
in a py file. Change-Id: Icfed4db68e1183ab19dbaf83ab5c9b6083f88fca Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
dabab693e9
commit
b7e562d32b
@@ -509,7 +509,7 @@ void SyntaxHighlighter::setFormatWithSpaces(const QString &text, int start, int
|
||||
QTextCharFormat visualSpaceFormat = d->whitespaceFormat;
|
||||
visualSpaceFormat.setBackground(format.background());
|
||||
|
||||
const int end = start + count;
|
||||
const int end = std::min(start + count, text.length());
|
||||
int index = start;
|
||||
|
||||
while (index != end) {
|
||||
|
||||
Reference in New Issue
Block a user