forked from qt-creator/qt-creator
Fix style of visualized whitespace for various vcs editors
Blame, log and git rebase editors. Task-number: QTCREATORBUG-17735 Change-Id: Ifd23ba7b6ccf3ef98d3026cdc8c17fd88c97797c Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -180,11 +180,13 @@ void DiffAndLogHighlighter::highlightBlock(const QString &text)
|
||||
if (format == TextEditor::C_ADDED_LINE) {
|
||||
// Mark trailing whitespace.
|
||||
const int trimmedLen = trimmedLength(text);
|
||||
setFormat(0, trimmedLen, formatForCategory(format));
|
||||
setFormatWithSpaces(text, 0, trimmedLen, formatForCategory(format));
|
||||
if (trimmedLen != length)
|
||||
setFormat(trimmedLen, length - trimmedLen, d->m_addedTrailingWhiteSpaceFormat);
|
||||
} else if (format != TextEditor::C_TEXT) {
|
||||
setFormat(0, length, formatForCategory(format));
|
||||
setFormatWithSpaces(text, 0, length, formatForCategory(format));
|
||||
} else {
|
||||
formatSpaces(text);
|
||||
}
|
||||
|
||||
// codefolding:
|
||||
|
||||
Reference in New Issue
Block a user