mirror of
https://github.com/paul-nameless/tg
synced 2024-11-22 20:03:17 +00:00
Add fallback to vim if $EDITOR env var is not set
This commit is contained in:
parent
c439c77a44
commit
f0ddbb2dbb
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ class Controller:
|
|||
def write_long_msg(self):
|
||||
file_path = "/tmp/tg-msg.txt"
|
||||
with suspend(self.view) as s:
|
||||
s.call(f"$EDITOR {file_path}")
|
||||
s.call(f"$EDITOR {file_path} || vim {file_path}")
|
||||
if not os.path.isfile(file_path):
|
||||
return
|
||||
with open(file_path) as f:
|
||||
|
|
Loading…
Reference in a new issue