Skip to content
Snippets Groups Projects
Commit d23d7cbc authored by cerf's avatar cerf Committed by Tobias Hunger
Browse files

Bazaar: fix code folding markers in the diff view


The top-level marker is now centered on the line starting with '==='

Merge-request: 274
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 2c088f06
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ using namespace Bazaar;
BazaarEditor::BazaarEditor(const VCSBase::VCSBaseEditorParameters *type, QWidget *parent)
: VCSBase::VCSBaseEditorWidget(type, parent),
m_exactChangesetId(QLatin1String(Constants::CHANGESET_ID_EXACT)),
m_diffIdentifier(QLatin1String(Constants::DIFFIDENTIFIER))
m_diffFileId(QLatin1String("^(=== modified file '.*'$)"))
{
setAnnotateRevisionTextFormat(tr("Annotate %1"));
setAnnotatePreviousRevisionTextFormat(tr("Annotate parent revision %1"));
......@@ -99,7 +99,7 @@ QString BazaarEditor::changeUnderCursor(const QTextCursor &cursorIn) const
VCSBase::DiffHighlighter *BazaarEditor::createDiffHighlighter() const
{
return new VCSBase::DiffHighlighter(m_diffIdentifier);
return new VCSBase::DiffHighlighter(m_diffFileId);
}
VCSBase::BaseAnnotationHighlighter *BazaarEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
......
......@@ -55,7 +55,7 @@ private:
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileSpec) const;
const QRegExp m_exactChangesetId;
const QRegExp m_diffIdentifier;
const QRegExp m_diffFileId;
};
} // namespace Internal
......
......@@ -44,7 +44,7 @@ const char * const BAZAARDEFAULT = "bzr";
//changeset identifiers
const char * const CHANGESET_ID = "([0-9]+)"; // match and capture
const char * const CHANGESET_ID_EXACT = "[0-9]+"; // match
const char * const DIFFIDENTIFIER = "^[-+]{3,3} [ab]{1,1}.*"; // match e.g. +++ b/filename
const char * const DIFF_ID = "^[-+]{3,3} [ab]{1,1}.*"; // match e.g. +++ b/filename
//BaseEditorParameters
const char * const COMMANDLOG_ID = "Bazaar Command Log Editor";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment