mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Fix inconsistency when scrolling :Git! preview window
Scrolling with win_execute() works fine while the command is running, but once the job has finished, it fails to update the viewport until the window is focused. I don't get it. It's not like the window knows a job is running. The only obvious trigger I could find is that 'nobuflisted' is set once once the job completes, but even disabling that behavior fails to rectify the problem. Screw it, manual focus bouncing for everyone. References: https://github.com/tpope/vim-fugitive/issues/1832
This commit is contained in:
@@ -3214,11 +3214,7 @@ function! s:RunReceive(state, tmp, type, job, data, ...) abort
|
|||||||
call setbufline(a:state.capture_bufnr, line_count + 1, lines)
|
call setbufline(a:state.capture_bufnr, line_count + 1, lines)
|
||||||
endif
|
endif
|
||||||
call setbufvar(a:state.capture_bufnr, '&modifiable', 0)
|
call setbufvar(a:state.capture_bufnr, '&modifiable', 0)
|
||||||
if !getwinvar(bufwinid(a:state.capture_bufnr), '&previewwindow')
|
if getwinvar(bufwinid(a:state.capture_bufnr), '&previewwindow')
|
||||||
" no-op
|
|
||||||
elseif exists('*win_execute')
|
|
||||||
call win_execute(bufwinid(a:state.capture_bufnr), '$')
|
|
||||||
else
|
|
||||||
let winnr = bufwinnr(a:state.capture_bufnr)
|
let winnr = bufwinnr(a:state.capture_bufnr)
|
||||||
if winnr > 0
|
if winnr > 0
|
||||||
let old_winnr = winnr()
|
let old_winnr = winnr()
|
||||||
|
|||||||
Reference in New Issue
Block a user