Dealt with the case where the preview window is used by another plugin

This commit is contained in:
Lingnan Dai
2015-01-07 16:55:25 +01:00
committed by Andy Stewart
parent 2c8e82ab80
commit 25257c44e7

View File

@@ -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"))