This commit is contained in:
Florian Bruhin 2017-11-24 07:25:10 +01:00
parent 8eab402820
commit 28d7c5e204
2 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,7 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit):
ed = editor.ExternalEditor(parent=self)
def callback(text):
"""Set the commandline to the edited text."""
if not text or text[0] not in modeparsers.STARTCHARS:
message.error('command must start with one of {}'
.format(modeparsers.STARTCHARS))

View File

@ -59,6 +59,7 @@ def set_up_editor(quteproc, server, tmpdir, text):
editor = json.dumps([sys.executable, str(script), '{}'])
quteproc.set_setting('editor.command', editor)
@bdd.when(bdd.parsers.parse('I set up a fake editor returning empty text'))
def set_up_editor_empty(quteproc, server, tmpdir):
"""Set up editor.command to a small python script inserting empty text."""