Reuse existing plug window

Close #532
This commit is contained in:
Junegunn Choi
2016-10-09 04:29:39 +09:00
parent 7bad3e7802
commit a2f1ea481d
2 changed files with 27 additions and 2 deletions

View File

@@ -726,10 +726,14 @@ function! s:prepare(...)
call s:job_abort()
if s:switch_in()
normal q
if b:plug_preview == 1
pc
endif
enew
else
call s:new_window()
endif
call s:new_window()
nnoremap <silent> <buffer> q :if b:plug_preview==1<bar>pc<bar>endif<bar>bd<cr>
if a:0 == 0
call s:finish_bindings()