forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
5a2459d1e1
commit
e0671c0d78
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user