mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 12:03:48 -05:00
Reset hunk previewing window's modified state.
This commit is contained in:
@@ -457,6 +457,7 @@ function! s:populate_hunk_preview_window(header, body)
|
|||||||
|
|
||||||
call nvim_buf_set_lines( winbufnr(s:winid), 0, -1, v:false, [])
|
call nvim_buf_set_lines( winbufnr(s:winid), 0, -1, v:false, [])
|
||||||
call nvim_buf_set_lines( winbufnr(s:winid), 0, -1, v:false, a:body)
|
call nvim_buf_set_lines( winbufnr(s:winid), 0, -1, v:false, a:body)
|
||||||
|
call nvim_buf_set_option(winbufnr(s:winid), 'modified', v:false)
|
||||||
call nvim_win_set_cursor( s:winid, [1,0])
|
call nvim_win_set_cursor( s:winid, [1,0])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -470,6 +471,7 @@ function! s:populate_hunk_preview_window(header, body)
|
|||||||
|
|
||||||
%delete _
|
%delete _
|
||||||
call setline(1, a:body)
|
call setline(1, a:body)
|
||||||
|
setlocal nomodified
|
||||||
1
|
1
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user