mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 19:43:47 -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
|
if !&previewwindow
|
||||||
execute 'bo ' . &previewheight . ' new'
|
execute 'bo ' . &previewheight . ' new'
|
||||||
set previewwindow
|
set previewwindow
|
||||||
setlocal filetype=diff buftype=nofile bufhidden=delete noswapfile
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
setlocal noro modifiable filetype=diff buftype=nofile bufhidden=delete noswapfile
|
||||||
execute "%delete_"
|
execute "%delete_"
|
||||||
call append(0, split(diff_for_hunk, "\n"))
|
call append(0, split(diff_for_hunk, "\n"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user