aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-06-11 09:16:14 +0300
committerOrgad Shaneh <orgads@gmail.com>2015-06-11 08:59:54 +0000
commite0671c0d7805c2897c32304f89dceafa30ee0dee (patch)
tree6eaef825dc3943441dc12f7d1d8447d36be176a1 /src/plugins/git
parent5a2459d1e19d9e8d62b6f8b7e0b41bd578fb7617 (diff)
Git: Fix detection of line with whitespace in commit highlighter
Git strips trailing whitespace. Change-Id: Ie0d3fa85007d4cd3646424faa772a904edc55966 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/git')
-rw-r--r--src/plugins/git/githighlighters.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/git/githighlighters.cpp b/src/plugins/git/githighlighters.cpp
index 50bd6cc2cfa..12153a91d5a 100644
--- a/src/plugins/git/githighlighters.cpp
+++ b/src/plugins/git/githighlighters.cpp
@@ -56,7 +56,7 @@ void GitSubmitHighlighter::highlightBlock(const QString &text)
{
// figure out current state
State state = static_cast<State>(previousBlockState());
- if (text.isEmpty()) {
+ if (text.trimmed().isEmpty()) {
if (state == Header)
state = Other;
setCurrentBlockState(state);