VCS: Handle code folding in diff view

Allow to do codefolding on files and hunks in the diff editor
This commit is contained in:
Tobias Hunger
2010-11-21 10:15:12 +01:00
parent f84c228568
commit 8808f0fa2d
4 changed files with 90 additions and 11 deletions

View File

@@ -114,7 +114,7 @@ QString GitEditor::changeUnderCursor(const QTextCursor &c) const
VCSBase::DiffHighlighter *GitEditor::createDiffHighlighter() const
{
const QRegExp filePattern(QLatin1String("^[-+][-+][-+] [ab].*"));
const QRegExp filePattern(QLatin1String("^(diff --git a/|index |[+-][+-][+-] [ab]).*$"));
return new VCSBase::DiffHighlighter(filePattern);
}