summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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()
 
href='#n85'>85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127