summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorornicar <thibault.duplessis@gmail.com>2011-02-13 12:08:05 -0800
committerornicar <thibault.duplessis@gmail.com>2011-02-13 12:08:05 -0800
commit37c4f2d98d4f2ec33e4d2935d34b862cd7923aeb (patch)
tree9bd029073982ec9fd360994fc618d22496d4d6fb /ranger
parent540d503322c5b26910760014e29897dc3549c0f0 (diff)
downloadranger-37c4f2d98d4f2ec33e4d2935d34b862cd7923aeb.tar.gz
[vim integration] the temp file is now passed through RANGER_RETURN_FILE
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/apps.py6
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()