From 2ffb1604d36d442223819e69f2522664c251d2ce Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Wed, 21 Feb 2018 10:01:27 -0500 Subject: [PATCH] Convert search to blue selection when entering caret mode --- qutebrowser/browser/webengine/webenginetab.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index 4595f7a6e..2c87acdc3 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -218,6 +218,13 @@ class WebEngineCaret(browsertab.AbstractCaret): if mode != usertypes.KeyMode.caret: return + # Clear search, replace with blue selection + if self._tab.search.search_displayed: + # We are currently in search mode. + # convert the search to a blue selection so we can operate on it + # https://bugreports.qt.io/browse/QTBUG-60673 + self._tab.search.clear() + self._tab.run_js_async( javascript.assemble('caret', 'setPlatform', sys.platform)) self._js_call('setInitialCursor')