Workaround to fix cursor movements with invisible cursor

Task-number: QTCREATORBUG-4957
Change-Id: I730550b4d558a2d7fbe34a4052b6cfc5e27fe6e5
Reviewed-on: http://codereview.qt.nokia.com/71
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Hoenig
2011-05-22 08:51:30 +02:00
committed by Leandro T. C. Melo
parent 98c412f866
commit 10dd9c9a8c

View File

@@ -786,21 +786,29 @@ void BaseTextEditorWidget::gotoNextCharacterWithSelection()
void BaseTextEditorWidget::gotoPreviousWord()
{
moveCursor(QTextCursor::PreviousWord);
// workaround to ensure blinking cursor is visible after move
setTextCursor(textCursor());
}
void BaseTextEditorWidget::gotoPreviousWordWithSelection()
{
moveCursor(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);
// workaround to ensure blinking cursor is visible after move
setTextCursor(textCursor());
}
void BaseTextEditorWidget::gotoNextWord()
{
moveCursor(QTextCursor::NextWord);
// workaround to ensure blinking cursor is visible after move
setTextCursor(textCursor());
}
void BaseTextEditorWidget::gotoNextWordWithSelection()
{
moveCursor(QTextCursor::NextWord, QTextCursor::KeepAnchor);
// workaround to ensure blinking cursor is visible after move
setTextCursor(textCursor());
}
void BaseTextEditorWidget::gotoPreviousWordCamelCase()