mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 21:03:53 -05:00
Fix :Gread deleting too much due to closed folds
This commit is contained in:
@@ -2978,6 +2978,9 @@ function! s:Read(count, line1, line2, range, bang, mods, args, ...) abort
|
||||
if file =~# '^fugitive:' && after is# 0
|
||||
return 'exe ' .string(mods . ' ' . fugitive#FileReadCmd(file, 0, pre)) . '|diffupdate'
|
||||
endif
|
||||
if foldlevel(after)
|
||||
exe after . 'foldopen!'
|
||||
endif
|
||||
return mods . ' ' . after . 'read' . pre . ' ' . s:fnameescape(file) . '|' . delete . 'diffupdate' . (a:count < 0 ? '|' . line('.') : '')
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user