mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
@@ -468,10 +468,14 @@ function! s:populate_hunk_preview_window(header, body)
|
||||
" Assumes cursor is not in previewing window.
|
||||
call nvim_buf_set_var(winbufnr(s:winid), 'hunk_header', a:header)
|
||||
|
||||
let [_scrolloff, &scrolloff] = [&scrolloff, 0]
|
||||
|
||||
let width = max(map(copy(a:body), 'strdisplaywidth(v:val)'))
|
||||
call nvim_win_set_width(s:winid, width)
|
||||
call nvim_win_set_height(s:winid, height)
|
||||
|
||||
let &scrolloff=_scrolloff
|
||||
|
||||
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_option(winbufnr(s:winid), 'modified', v:false)
|
||||
|
||||
Reference in New Issue
Block a user