From cdf4f692518f4c35f23c359d3bad715ea030ae00 Mon Sep 17 00:00:00 2001 From: Luca Benci Date: Thu, 12 Oct 2017 22:43:31 +0200 Subject: [PATCH] Pass `caret_position` to editor's `edit()` --- qutebrowser/browser/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 7a8825720..a8400954e 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1594,10 +1594,12 @@ class CommandDispatcher: return assert isinstance(text, str), text + caret_position = elem.caret_position() + ed = editor.ExternalEditor(self._tabbed_browser) ed.editing_finished.connect(functools.partial( self.on_editing_finished, elem)) - ed.edit(text) + ed.edit(text, caret_position) @cmdutils.register(instance='command-dispatcher', hide=True, scope='window')