From 11b5958bc4224cf8449cf376e05b4a5b4cd0782f Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Wed, 24 Oct 2018 20:39:14 -0700 Subject: [PATCH] Fix selection clearing when using Closes #2886 --- qutebrowser/misc/miscwidgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/misc/miscwidgets.py b/qutebrowser/misc/miscwidgets.py index eef127cf2..36dad4f41 100644 --- a/qutebrowser/misc/miscwidgets.py +++ b/qutebrowser/misc/miscwidgets.py @@ -94,7 +94,7 @@ class CommandLineEdit(QLineEdit): We use __ here to avoid accidentally overriding it in subclasses. """ if new < self._promptlen: - self.setCursorPosition(self._promptlen) + self.cursorForward(self.hasSelectedText(), self._promptlen - new) def set_prompt(self, text): """Set the current prompt to text.