commit b3affc834d53e9c9ac763d0cdc12da6d434e3481 (tree)
parent 06d6684d0854620f4f8d8af3318a4b7cfec1e117
Author: Tim Pope <code@tpope.net>
Date: Sun, 31 Jan 2010 16:04:10 -0500
Add trailing slash to :Gmove completion
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -1064,7 +1064,9 @@ function! s:MoveComplete(A,L,P)
if a:A =~ '^/'
return s:repo().superglob(a:A)
else
- return split(glob(a:A.'*'),"\n")
+ let matches = split(glob(a:A.'*'),"\n")
+ call map(matches,'v:val !~ "/$" && isdirectory(v:val) ? v:val."/" : v:val')
+ return matches
endif
endfunction