From 156d63b4b6eb25d852bf970d28f4628c9c1d206c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 27 May 2014 11:16:53 +0200 Subject: [PATCH] Only handle {} as editor arg when alone in argument --- qutebrowser/utils/editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/utils/editor.py b/qutebrowser/utils/editor.py index 4efa3f2a0..f3f48ba13 100644 --- a/qutebrowser/utils/editor.py +++ b/qutebrowser/utils/editor.py @@ -113,6 +113,6 @@ class ExternalEditor(QObject): self.proc.error.connect(self.on_proc_error) editor = config.get('general', 'editor') executable = editor[0] - args = [arg.replace('{}', self.filename) for arg in editor[1:]] + args = [self.filename if arg == '{}' else arg for arg in editor[1:]] logger.debug("Calling \"{}\" with args {}".format(executable, args)) self.proc.start(executable, args)