here's a small patch that makes gitv no longer assume that all diff paths start with "a/" or "b/" (diff.noprefix=true).
Furthermore I would have thought that C-CR should open the diff folds by default - is that correct?
I see no difference between C-CR and CR from the commit list view, using a current git checkout and vim 7.3.429.
diff --git plugin/fugitive.vim plugin/fugitive.vim
index 041c8be..a9f68f0 100644
--- plugin/fugitive.vim
+++ plugin/fugitive.vim
@@ -2413,8 +2416,8 @@ function! fugitive#foldtext() abort
let [add, remove] = [-1, -1]
let filename = ''
for lnum in range(v:foldstart, v:foldend)
if filename ==# '' && getline(lnum) =~# '^[+-]{3} [ab]/'
let filename = getline(lnum)[6:-1]
if filename ==# '' && getline(lnum) =~# '^[+-]{3} '
let filename = getline(lnum)[4:-1]
endif
if getline(lnum) =~# '^+'
let add += 1
Hi, thanks for sending this my way. It looks to be a patch for fugitive though, which I am not the maintainer of. You may wish to send this as a pull request to tpope: https://github.com/tpope/vim-fugitive
Hello Greg,
here's a small patch that makes gitv no longer assume that all diff paths start with "a/" or "b/" (diff.noprefix=true).
Furthermore I would have thought that C-CR should open the diff folds by default - is that correct? I see no difference between C-CR and CR from the commit list view, using a current git checkout and vim 7.3.429.
diff --git plugin/fugitive.vim plugin/fugitive.vim index 041c8be..a9f68f0 100644 --- plugin/fugitive.vim +++ plugin/fugitive.vim @@ -2413,8 +2416,8 @@ function! fugitive#foldtext() abort let [add, remove] = [-1, -1] let filename = '' for lnum in range(v:foldstart, v:foldend)
Thank you.