:Gread is now equivalent to :Gread!

This commit is contained in:
Tim Pope
2010-01-11 15:21:43 -05:00
parent bfdcdf1fbd
commit 79339bfa81
2 changed files with 9 additions and 10 deletions

View File

@@ -732,15 +732,12 @@ function! s:Edit(cmd,...) abort
catch /^fugitive:/
return 'echoerr v:errmsg'
endtry
if a:cmd =~# 'read!$'
if a:cmd =~# 'read!$' || a:cmd ==# 'read'
return '%delete|read '.s:fnameescape(file).'|1delete_|diffupdate|'.line('.')
else
if &previewwindow && getbufvar('','fugitive_type') ==# 'index'
wincmd p
endif
if a:cmd == 'read'
call s:warn('Use :.Gread for future compatibility')
endif
return a:cmd.' '.s:fnameescape(file)
endif
endfunction