Add space between tmpfile and editor command in Windows' parsed_editor_path

This commit is contained in:
karimpwnz 2021-01-04 04:47:22 +02:00
parent ccf7d22a2d
commit 5fdacfbaca

View file

@ -28,7 +28,7 @@ def get_text_from_editor(config, template=""):
# https://stackoverflow.com/questions/33560364/python-windows-parsing-command-lines-with-shlex # https://stackoverflow.com/questions/33560364/python-windows-parsing-command-lines-with-shlex
# https://bugs.python.org/issue1724822 # https://bugs.python.org/issue1724822
if on_windows: if on_windows:
parsed_editor_path = config["editor"] + tmpfile parsed_editor_path = config["editor"] + " " + tmpfile
else: else:
parsed_editor_path = shlex.split(config["editor"]) + [tmpfile] parsed_editor_path = shlex.split(config["editor"]) + [tmpfile]
subprocess.call(parsed_editor_path) subprocess.call(parsed_editor_path)