diff options
author | hut <hut@lavabit.com> | 2012-02-21 14:48:00 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-02-21 14:48:36 +0100 |
commit | 9ff49bf6b1004126b528b73c1d7822ce99581410 (patch) | |
tree | 8f25da89513b4c7be97cdfecb81887c1ead5a28c /doc | |
parent | ec18cfafc2f85e4dbc4ab2d61588395a59352443 (diff) | |
download | ranger-9ff49bf6b1004126b528b73c1d7822ce99581410.tar.gz |
ranger.1: fix vim script "RangerChooser" when no file is opened
https://savannah.nongnu.org/bugs/?35556
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ranger.1 | 4 | ||||
-rw-r--r-- | doc/ranger.pod | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1 index 60731bbc..fe2d2d1e 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.5.2" "02/12/2012" "ranger manual" +.TH RANGER 1 "ranger-1.5.2" "02/21/2012" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -906,7 +906,7 @@ opening in your current vim session. .PP .Vb 9 \& fun! RangerChooser() -\& silent !ranger \-\-choosefile=/tmp/chosenfile \`[ \-z \*(Aq%\*(Aq ] && echo \-n . || dirname %\` +\& exec "silent !ranger \-\-choosefile=/tmp/chosenfile " . expand("%:p:h") \& if filereadable(\*(Aq/tmp/chosenfile\*(Aq) \& exec \*(Aqedit \*(Aq . system(\*(Aqcat /tmp/chosenfile\*(Aq) \& call system(\*(Aqrm /tmp/chosenfile\*(Aq) diff --git a/doc/ranger.pod b/doc/ranger.pod index 926a8de0..f438cae7 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -1004,7 +1004,7 @@ This is a vim function which allows you to use ranger to select a file for opening in your current vim session. fun! RangerChooser() - silent !ranger --choosefile=/tmp/chosenfile `[ -z '%' ] && echo -n . || dirname %` + exec "silent !ranger --choosefile=/tmp/chosenfile " . expand("%:p:h") if filereadable('/tmp/chosenfile') exec 'edit ' . system('cat /tmp/chosenfile') call system('rm /tmp/chosenfile') |