Only handle {} as editor arg when alone in argument

This commit is contained in:
Florian Bruhin 2014-05-27 11:16:53 +02:00
parent 8b0144f6a3
commit 156d63b4b6

View File

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