diff --git a/plug.vim b/plug.vim index 1da64a9..2b413b4 100644 --- a/plug.vim +++ b/plug.vim @@ -726,10 +726,17 @@ function! s:prepare(...) call s:job_abort() if s:switch_in() + let new_window = winnr('$') > 1 normal q + else + let new_window = 1 endif - call s:new_window() + if new_window + call s:new_window() + else + enew + endif nnoremap q :if b:plug_preview==1pcendifbd if a:0 == 0 call s:finish_bindings()