mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Fix staging partial hunk near EOF lacking newline
This is a blind, untested fix. Closes https://github.com/tpope/vim-fugitive/issues/1609
This commit is contained in:
@@ -3554,9 +3554,9 @@ function! s:StageApply(info, reverse, extra) abort
|
||||
if empty(filter(copy(lines), 'v:val =~# "^[+-]"'))
|
||||
return -1
|
||||
endif
|
||||
while getline(end) =~# '^[-+ ]'
|
||||
while getline(end) =~# '^[-+\ ]'
|
||||
let end += 1
|
||||
if getline(end) =~# '^[' . (a:reverse ? '+' : '-') . ' ]'
|
||||
if getline(end) =~# '^[' . (a:reverse ? '+' : '-') . '\ ]'
|
||||
call add(lines, ' ' . getline(end)[1:-1])
|
||||
endif
|
||||
endwhile
|
||||
|
||||
Reference in New Issue
Block a user