mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Ensure open folds after expanding inline diff
This commit is contained in:
@@ -3485,6 +3485,9 @@ function! s:StageInline(mode, ...) abort
|
|||||||
if len(diff)
|
if len(diff)
|
||||||
setlocal modifiable noreadonly
|
setlocal modifiable noreadonly
|
||||||
silent call append(lnum, diff)
|
silent call append(lnum, diff)
|
||||||
|
if foldclosed(lnum+1)
|
||||||
|
silent exe (lnum+1) . ',' . (lnum+len(diff)) . 'foldopen!'
|
||||||
|
endif
|
||||||
let b:fugitive_expanded[info.section][info.filename] = [start, len(diff)]
|
let b:fugitive_expanded[info.section][info.filename] = [start, len(diff)]
|
||||||
setlocal nomodifiable readonly nomodified
|
setlocal nomodifiable readonly nomodified
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user