mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
dolphin: disable line numbers for the diff document view
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
65cf467943
commit
2ee80d816c
1 changed files with 7 additions and 0 deletions
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include <klocale.h>
|
||||
#include <kdebug.h>
|
||||
#include <KTextEditor/View>
|
||||
#include <KTextEditor/ConfigInterface>
|
||||
|
||||
#include <git2/buffer.h>
|
||||
#include <git2/message.h>
|
||||
|
@ -55,6 +57,11 @@ GitCommitDialog::GitCommitDialog(QWidget *parent)
|
|||
if (m_diffdocument) {
|
||||
m_diffdocument->setHighlightingMode("Diff");
|
||||
KTextEditor::View* diffview = m_diffdocument->createView(m_detailstab);
|
||||
KTextEditor::ConfigInterface* diffconfig = qobject_cast<KTextEditor::ConfigInterface*>(diffview);
|
||||
if (diffconfig) {
|
||||
// line numbers will not represent the line number in the changed file, disable them
|
||||
diffconfig->setConfigValue("line-numbers", false);
|
||||
}
|
||||
m_detailstab->addTab((QWidget*)diffview, KIcon("text-x-patch"), i18n("Staged changes"));
|
||||
} else {
|
||||
kWarning() << "Could not create text editor, using fallback";
|
||||
|
|
Loading…
Add table
Reference in a new issue