better detection of editor used
This commit is contained in:
parent
9ca4784a27
commit
478e85a2d8
1 changed files with 4 additions and 2 deletions
|
|
@ -497,8 +497,10 @@ class ConsoleApplication(BaseApplication):
|
|||
content = content.encode(sys.stdin.encoding or locale.getpreferredencoding())
|
||||
f.write(content)
|
||||
f.flush()
|
||||
if editor_params is not None and editor in editor_params:
|
||||
params = editor_params[editor]
|
||||
if editor_params is not None and os.path.basename(editor) in editor_params:
|
||||
params = editor_params[os.path.basename(editor)]
|
||||
else:
|
||||
params = ''
|
||||
os.system("%s %s %s" % (editor, params, filename))
|
||||
f.seek(0)
|
||||
text = f.read()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue