aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/githighlighters.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-05-08 10:52:28 +0200
committerEike Ziller <eike.ziller@qt.io>2017-05-23 11:32:57 +0000
commitb289dbde3cfaabc4053039b65770cd6a16e4029c (patch)
tree4d53ae46c3ea5eb8b954482d3d44c68972c352ca /src/plugins/git/githighlighters.cpp
parent1a9808d3937432da737489c993277d31aad3da21 (diff)
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>
Diffstat (limited to 'src/plugins/git/githighlighters.cpp')
-rw-r--r--src/plugins/git/githighlighters.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/plugins/git/githighlighters.cpp b/src/plugins/git/githighlighters.cpp
index fbc72dae95..890821c745 100644
--- a/src/plugins/git/githighlighters.cpp
+++ b/src/plugins/git/githighlighters.cpp
@@ -137,23 +137,23 @@ void GitRebaseHighlighter::highlightBlock(const QString &text)
setFormat(changeIndex, changeLen, formatForCategory(Format_Change));
changeIndex += changeLen;
}
- return;
- }
-
- for (const RebaseAction &action : Utils::asConst(m_actions)) {
- if (action.exp.indexIn(text) != -1) {
- const int len = action.exp.matchedLength();
- setFormat(0, len, formatForCategory(action.formatCategory));
- const int changeIndex = m_changeNumberPattern.indexIn(text, len);
- if (changeIndex != -1) {
- const int changeLen = m_changeNumberPattern.matchedLength();
- const int descStart = changeIndex + changeLen + 1;
- setFormat(changeIndex, changeLen, formatForCategory(Format_Change));
- setFormat(descStart, text.size() - descStart, formatForCategory(Format_Description));
+ } else {
+ for (const RebaseAction &action : Utils::asConst(m_actions)) {
+ if (action.exp.indexIn(text) != -1) {
+ const int len = action.exp.matchedLength();
+ setFormat(0, len, formatForCategory(action.formatCategory));
+ const int changeIndex = m_changeNumberPattern.indexIn(text, len);
+ if (changeIndex != -1) {
+ const int changeLen = m_changeNumberPattern.matchedLength();
+ const int descStart = changeIndex + changeLen + 1;
+ setFormat(changeIndex, changeLen, formatForCategory(Format_Change));
+ setFormat(descStart, text.size() - descStart, formatForCategory(Format_Description));
+ }
+ break;
}
- break;
}
}
+ formatSpaces(text);
}
} // namespace Internal