mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 05:13:53 -05:00
Fix inline diff expansion when foldmethod is not syntax
Also rearrange, so any other errors here don't break the basics.
This commit is contained in:
@@ -3490,11 +3490,11 @@ 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
|
||||||
|
if foldclosed(lnum+1) > 0
|
||||||
|
silent exe (lnum+1) . ',' . (lnum+len(diff)) . 'foldopen!'
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
return lnum
|
return lnum
|
||||||
|
|||||||
Reference in New Issue
Block a user