forked from qt-creator/qt-creator
VCS: update the text cursor of VcsBaseEditorWidget
TextEditorWidget::slotCursorPositionChanged makes sure that the multi text cursor in the TextEditorWidget reflects all changes of the QPlainTextEdit cursor. Fixes: QTCREATORBUG-26360 Change-Id: I43d612c6f85fedbf45179898e044b516a93a3ed8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -958,8 +958,7 @@ void VcsBaseEditorWidget::slotCursorPositionChanged()
|
|||||||
// Adapt entries combo to new position
|
// Adapt entries combo to new position
|
||||||
// if the cursor goes across a file line.
|
// if the cursor goes across a file line.
|
||||||
const int newCursorLine = textCursor().blockNumber();
|
const int newCursorLine = textCursor().blockNumber();
|
||||||
if (newCursorLine == d->m_cursorLine)
|
if (newCursorLine != d->m_cursorLine) {
|
||||||
return;
|
|
||||||
// Which section does it belong to?
|
// Which section does it belong to?
|
||||||
d->m_cursorLine = newCursorLine;
|
d->m_cursorLine = newCursorLine;
|
||||||
const int section = sectionOfLine(d->m_cursorLine, d->m_entrySections);
|
const int section = sectionOfLine(d->m_cursorLine, d->m_entrySections);
|
||||||
@@ -971,6 +970,8 @@ void VcsBaseEditorWidget::slotCursorPositionChanged()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
TextEditorWidget::slotCursorPositionChanged();
|
||||||
|
}
|
||||||
|
|
||||||
void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user