From 54953805808485eeb37a393ef0041425d2b28333 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Mon, 20 Nov 2017 11:39:12 -0500 Subject: [PATCH] Exit command mode after :edit-command --run. Resolves #3317, where the command prompt was left open and populated with text after running the command. --- qutebrowser/mainwindow/statusbar/command.py | 2 +- tests/end2end/features/editor.feature | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index a61f3c93d..bba2559ed 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -178,7 +178,7 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): def callback(text): self.set_cmd_text(text) if run: - self.got_cmd[str].emit(text) + self.command_accept() ed.editing_finished.connect(callback) ed.edit(self.text()) diff --git a/tests/end2end/features/editor.feature b/tests/end2end/features/editor.feature index 21df30b4d..79f4f17d4 100644 --- a/tests/end2end/features/editor.feature +++ b/tests/end2end/features/editor.feature @@ -149,3 +149,4 @@ Feature: Opening external editors And I set up a fake editor replacing "foo" by "bar" And I run :edit-command --run Then the message "bar" should be shown + And "Leaving mode KeyMode.command (reason: cmd accept)" should be logged