diff options
-rw-r--r-- | ranger/defaults/apps.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py index 1585012b..44f0684a 100644 --- a/ranger/defaults/apps.py +++ b/ranger/defaults/apps.py @@ -55,9 +55,9 @@ class CustomApplications(Applications): """How to determine the default application?""" f = c.file - if 'INVIM' in os.environ: - tmp_file = gettempdir() + "/ranger-selected-file" - with open(tmp_file, 'w') as tmp: + return_file = os.getenv("RANGER_RETURN_FILE") + if return_file is not None: + with open(return_file, 'w') as tmp: tmp.write(f.path) raise SystemExit() |