diff options
-rw-r--r-- | ranger/help/invocation.py | 6 |
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() |