Exit command mode after :edit-command --run.

Resolves #3317, where the command prompt was left open and populated
with text after running the command.
This commit is contained in:
Ryan Roden-Corrent 2017-11-20 11:39:12 -05:00
parent abb5c9f638
commit 5495380580
2 changed files with 2 additions and 1 deletions

View File

@ -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())

View File

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