forked from qt-creator/qt-creator
VCS: Fix Apply/Revert for last line of chunk
Task-number: QTCREATORBUG-6487 Change-Id: Id225856e267a4c8ac6dc15d5573175e7f0ce777f Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
23290e4df0
commit
3df6b712e4
@@ -796,8 +796,7 @@ DiffChunk VCSBaseEditorWidget::diffChunk(QTextCursor cursor) const
|
||||
DiffChunk rc;
|
||||
// Search back for start of chunk.
|
||||
QTextBlock block = cursor.block();
|
||||
QTextBlock next = block.next();
|
||||
if (next.isValid() && TextEditor::BaseTextDocumentLayout::foldingIndent(next) <= 1)
|
||||
if (block.isValid() && TextEditor::BaseTextDocumentLayout::foldingIndent(block) <= 1)
|
||||
/* We are in a diff header, not in a chunk! DiffHighlighter sets the foldingIndent for us. */
|
||||
return rc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user