mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 12:03:48 -05:00
Avoid autocmd side-effects when jumping to/from preview window.
Fixes #379.
This commit is contained in:
@@ -236,7 +236,7 @@ function! gitgutter#preview_hunk() abort
|
|||||||
|
|
||||||
silent! wincmd P
|
silent! wincmd P
|
||||||
if !&previewwindow
|
if !&previewwindow
|
||||||
execute 'bo ' . &previewheight . ' new'
|
noautocmd execute 'bo ' . &previewheight . ' new'
|
||||||
set previewwindow
|
set previewwindow
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ function! gitgutter#preview_hunk() abort
|
|||||||
execute "%delete_"
|
execute "%delete_"
|
||||||
call append(0, split(diff_for_hunk, "\n"))
|
call append(0, split(diff_for_hunk, "\n"))
|
||||||
|
|
||||||
wincmd p
|
noautocmd wincmd p
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
call gitgutter#utility#restore_shell()
|
call gitgutter#utility#restore_shell()
|
||||||
|
|||||||
Reference in New Issue
Block a user