If someone tries to run an editor, use our fake-editor instead

This commit is contained in:
blinry 2021-02-11 11:05:33 +01:00
parent ed7de720a9
commit 5b590b8367
2 changed files with 5 additions and 1 deletions

View file

@ -80,6 +80,11 @@ func send_command(command):
input.editable = false
completions.hide()
# If someone tries to run an editor, use fake-editor instead.
var editor_regex = RegEx.new()
editor_regex.compile("^(vim?|gedit|emacs|kate|nano|code) ")
command = editor_regex.sub(command, "fake-editor ")
var cmd = repository.shell.run_async(command, false)
yield(cmd, "done")
call_deferred("command_done", cmd)