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>
This commit is contained in:
Orgad Shaneh
2015-06-11 09:16:14 +03:00
committed by Orgad Shaneh
parent 5a2459d1e1
commit e0671c0d78

View File

@@ -56,7 +56,7 @@ void GitSubmitHighlighter::highlightBlock(const QString &text)
{ {
// figure out current state // figure out current state
State state = static_cast<State>(previousBlockState()); State state = static_cast<State>(previousBlockState());
if (text.isEmpty()) { if (text.trimmed().isEmpty()) {
if (state == Header) if (state == Header)
state = Other; state = Other;
setCurrentBlockState(state); setCurrentBlockState(state);