From 078fbba42924497d381def8d34e91945e2a40e55 Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Tue, 5 Mar 2013 10:57:37 +0100 Subject: [PATCH] QmlConsole: Fixes navigation issue with right arrow key When the cursor is just before the first element, the right key did not work. Change-Id: I0a00b0593d4a6450311253cc021c70a64f75b456 Reviewed-by: Kai Koehne --- src/plugins/qmljstools/qmlconsoleedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmljstools/qmlconsoleedit.cpp b/src/plugins/qmljstools/qmlconsoleedit.cpp index 9793abc1905..7c13b0bc67d 100644 --- a/src/plugins/qmljstools/qmlconsoleedit.cpp +++ b/src/plugins/qmljstools/qmlconsoleedit.cpp @@ -135,7 +135,7 @@ void QmlConsoleEdit::keyPressEvent(QKeyEvent *e) // Right: Moves the cursor one character to the right. case Qt::Key_Right: if ( !(e->modifiers() & Qt::ControlModifier) - && textCursor().position() <= m_startOfEditableArea) { + && textCursor().position() < m_startOfEditableArea) { QTextCursor c(textCursor()); c.setPosition(m_startOfEditableArea); setTextCursor(c);