Never :Gedit with a trailing slash

This commit is contained in:
Tim Pope
2015-12-01 18:35:25 -05:00
parent c3e918072f
commit a9a22e0e4e

View File

@@ -1408,6 +1408,7 @@ function! s:Edit(cmd,bang,...) abort
catch /^fugitive:/
return 'echoerr v:errmsg'
endtry
let file = s:sub(file, '/$', '')
if a:cmd ==# 'read'
return 'silent %delete_|read '.s:fnameescape(file).'|silent 1delete_|diffupdate|'.line('.')
else