Use existing selection when entering caret mode.

This commit is contained in:
Florian Bruhin 2015-06-20 13:09:00 +02:00
parent 5cf1dce89e
commit e459ac52cc

View File

@ -460,7 +460,7 @@ class WebView(QWebView):
elif mode == usertypes.KeyMode.caret:
settings = self.settings()
settings.setAttribute(QWebSettings.CaretBrowsingEnabled, True)
self.selection_enabled = False
self.selection_enabled = bool(self.page().selectedText())
if self.isVisible():
# Sometimes the caret isn't immediately visible, but unfocusing