mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Dealt with the case where the preview window is used by another plugin
This commit is contained in:
committed by
Andy Stewart
parent
2c8e82ab80
commit
25257c44e7
@@ -196,9 +196,9 @@ function! gitgutter#preview_hunk()
|
||||
if !&previewwindow
|
||||
execute 'bo ' . &previewheight . ' new'
|
||||
set previewwindow
|
||||
setlocal filetype=diff buftype=nofile bufhidden=delete noswapfile
|
||||
endif
|
||||
|
||||
setlocal noro modifiable filetype=diff buftype=nofile bufhidden=delete noswapfile
|
||||
execute "%delete_"
|
||||
call append(0, split(diff_for_hunk, "\n"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user