From 26edba9dece2145c86be270888129dfa98512e27 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 9 Jan 2010 13:41:51 -0500 Subject: [PATCH] Fix :0Gread to operate at very top of file --- doc/fugitive.txt | 3 ++- plugin/fugitive.vim | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 0cbb887..8015877 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -78,7 +78,8 @@ that are part of Git repositories). :Gpedit [revision] |:pedit| a |fugitive-revision| *fugitive-:Gread* -:Gread [revision] |:read| a |fugitive-revision| +:[range]Gread [revision] + |:read| a |fugitive-revision| *fugitive-:Gread!* :Gread! [revision] Empty the buffer and |:read| a |fugitive-revision|. diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 5f5f43a..507d42d 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -653,7 +653,7 @@ call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gpedit call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gsplit :execute s:Edit('split',)") call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gvsplit :execute s:Edit('vsplit',)") call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Gtabedit :execute s:Edit('tabedit',)") -call s:command("-bar -bang -nargs=? -range -complete=customlist,s:EditComplete Gread :execute s:Edit(',read',)") +call s:command("-bar -bang -nargs=? -count -complete=customlist,s:EditComplete Gread :execute s:Edit((! && ? '' : ).'read',)") " }}}1 " Gwrite {{{1