forked from qt-creator/qt-creator
Git: Disable instant blame for modified files
Change-Id: Iae24a8bbcbdb3663367ee863e8cc27ad92942e17 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
committed by
André Hartmann
parent
196e73fa16
commit
8e5c84e3dd
@@ -1546,6 +1546,13 @@ void GitPluginPrivate::instantBlame()
|
|||||||
const TextEditorWidget *widget = TextEditorWidget::currentTextEditorWidget();
|
const TextEditorWidget *widget = TextEditorWidget::currentTextEditorWidget();
|
||||||
if (!widget)
|
if (!widget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (widget->textDocument()->isModified()) {
|
||||||
|
m_blameMark.reset();
|
||||||
|
m_lastVisitedEditorLine = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const QTextCursor cursor = widget->textCursor();
|
const QTextCursor cursor = widget->textCursor();
|
||||||
const QTextBlock block = cursor.block();
|
const QTextBlock block = cursor.block();
|
||||||
const int line = block.blockNumber() + 1;
|
const int line = block.blockNumber() + 1;
|
||||||
|
Reference in New Issue
Block a user