about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-02-15 00:06:43 +0000
committerhut <hut@lavabit.com>2011-02-15 00:06:43 +0000
commitc3abe35722f24993e369cf589070f3cc8994ee78 (patch)
tree33e1cce6d7fe7678a2eb864cf392ec4b61cbe5b9
parent19f5ef2dd535656e385e4dfb8801e7e4b8005a22 (diff)
downloadranger-c3abe35722f24993e369cf589070f3cc8994ee78.tar.gz
Improved --choosefile vimscript in documentation
-rw-r--r--ranger/help/invocation.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/help/invocation.py b/ranger/help/invocation.py
index 75d2330e..f71e3892 100644
--- a/ranger/help/invocation.py
+++ b/ranger/help/invocation.py
@@ -74,8 +74,10 @@ command line.
 
       fun Ranger()
         silent !ranger --choosefile=/tmp/chosen
-        exec 'edit ' . system('cat /tmp/chosen')
-        call system('rm /tmp/chosen')
+        if filereadable('/tmp/chosen')
+          exec 'edit ' . system('cat /tmp/chosen')
+          call system('rm /tmp/chosen')
+        endif
         redraw!
       endfun
       map <leader>r :call Ranger()