Fix selection clearing when using <shift-home>

Closes #2886
This commit is contained in:
Jay Kamat 2018-10-24 20:39:14 -07:00
parent 9727975914
commit 11b5958bc4
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -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.