motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit c448104332b095251a468765b4c58fa103b0b5fa (tree)
parent 441074f88139d39c8fd05bb56cbac78a7cbad81c
Author: Tim Pope <code@tpope.net>
Date:   Sun,  6 Jan 2019 02:37:30 -0500

Fix :Gread deleting too much due to closed folds

Diffstat:
Mautoload/fugitive.vim | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -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