summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2011-11-13 22:51:43 +0200
committerTobias Hunger <tobias.hunger@nokia.com>2011-11-14 10:20:51 +0100
commit3df6b712e40acce3e00573d1ed22350a4f9879e2 (patch)
tree6fe3d574ec7b27c80e5f543b257cf5cea1068707 /src
parent23290e4df08ebbb523b51763ef6f944744606a99 (diff)
downloadqt-creator-3df6b712e40acce3e00573d1ed22350a4f9879e2.tar.gz
VCS: Fix Apply/Revert for last line of chunk
Task-number: QTCREATORBUG-6487 Change-Id: Id225856e267a4c8ac6dc15d5573175e7f0ce777f Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp
index 1459cc5093..de7cdc3ad7 100644
--- a/src/plugins/vcsbase/vcsbaseeditor.cpp
+++ b/src/plugins/vcsbase/vcsbaseeditor.cpp
@@ -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;