mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 21:03: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)
|
||||
setlocal modifiable noreadonly
|
||||
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)]
|
||||
setlocal nomodifiable readonly nomodified
|
||||
if foldclosed(lnum+1) > 0
|
||||
silent exe (lnum+1) . ',' . (lnum+len(diff)) . 'foldopen!'
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
return lnum
|
||||
|
||||
Reference in New Issue
Block a user