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())
|
content = content.encode(sys.stdin.encoding or locale.getpreferredencoding())
|
||||||
f.write(content)
|
f.write(content)
|
||||||
f.flush()
|
f.flush()
|
||||||
if editor_params is not None and editor in editor_params:
|
if editor_params is not None and os.path.basename(editor) in editor_params:
|
||||||
params = editor_params[editor]
|
params = editor_params[os.path.basename(editor)]
|
||||||
|
else:
|
||||||
|
params = ''
|
||||||
os.system("%s %s %s" % (editor, params, filename))
|
os.system("%s %s %s" % (editor, params, filename))
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
text = f.read()
|
text = f.read()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue