diff options
author | ornicar <thibault.duplessis@gmail.com> | 2011-02-13 12:08:05 -0800 |
---|---|---|
committer | ornicar <thibault.duplessis@gmail.com> | 2011-02-13 12:08:05 -0800 |
commit | 37c4f2d98d4f2ec33e4d2935d34b862cd7923aeb (patch) | |
tree | 9bd029073982ec9fd360994fc618d22496d4d6fb | |
parent | 540d503322c5b26910760014e29897dc3549c0f0 (diff) | |
download | ranger-37c4f2d98d4f2ec33e4d2935d34b862cd7923aeb.tar.gz |
[vim integration] the temp file is now passed through RANGER_RETURN_FILE
-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() |