From 43a603524b77572e2fd3468a610c78a77059d469 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 23 Jan 2012 14:18:08 +0100 Subject: [PATCH] remove selection of text by pressing down-key on the last text postion Task-number: QTCREATORBUG-5757 Change-Id: Icc1714a29e5eb74e7d6db413285232a2042f95f2 Reviewed-by: Leandro Melo --- src/plugins/texteditor/basetexteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 1d75d6d4544..70a26da53df 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1519,8 +1519,8 @@ bool BaseTextEditorWidget::cursorMoveKeyEvent(QKeyEvent *e) camelCaseRight(cursor, mode); } else if (camelCaseNavigationEnabled() && op == QTextCursor::WordLeft) { camelCaseLeft(cursor, mode); - } else { - cursor.movePosition(op, mode); + } else if (!cursor.movePosition(op, mode) && mode == QTextCursor::MoveAnchor) { + cursor.clearSelection(); } cursor.setVisualNavigation(visualNavigation);