mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
parent
7bad3e7802
commit
a2f1ea481d
8
plug.vim
8
plug.vim
@ -726,10 +726,14 @@ function! s:prepare(...)
|
|||||||
|
|
||||||
call s:job_abort()
|
call s:job_abort()
|
||||||
if s:switch_in()
|
if s:switch_in()
|
||||||
normal q
|
if b:plug_preview == 1
|
||||||
|
pc
|
||||||
|
endif
|
||||||
|
enew
|
||||||
|
else
|
||||||
|
call s:new_window()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call s:new_window()
|
|
||||||
nnoremap <silent> <buffer> q :if b:plug_preview==1<bar>pc<bar>endif<bar>bd<cr>
|
nnoremap <silent> <buffer> q :if b:plug_preview==1<bar>pc<bar>endif<bar>bd<cr>
|
||||||
if a:0 == 0
|
if a:0 == 0
|
||||||
call s:finish_bindings()
|
call s:finish_bindings()
|
||||||
|
@ -1520,3 +1520,24 @@ Execute (#530 - Comparison of incompatible git URIs):
|
|||||||
|
|
||||||
" Different port
|
" Different port
|
||||||
Assert !CompareURI('https://github.com/junegunn/vim-plug.git', 'https://github.com:12345/junegunn/vim-plug.git')
|
Assert !CompareURI('https://github.com/junegunn/vim-plug.git', 'https://github.com:12345/junegunn/vim-plug.git')
|
||||||
|
|
||||||
|
Execute (#532 - Reuse plug window):
|
||||||
|
PlugDiff
|
||||||
|
AssertEqual 1, winnr()
|
||||||
|
AssertEqual 2, winnr('$')
|
||||||
|
|
||||||
|
" Open preview window
|
||||||
|
execute "normal ]]jo"
|
||||||
|
AssertEqual 2, winnr()
|
||||||
|
AssertEqual 3, winnr('$')
|
||||||
|
|
||||||
|
" Move plug window to the right
|
||||||
|
wincmd L
|
||||||
|
AssertEqual 3, winnr()
|
||||||
|
AssertEqual 3, winnr('$')
|
||||||
|
|
||||||
|
" Reuse plug window. Preview window is closed.
|
||||||
|
PlugStatus
|
||||||
|
AssertEqual 2, winnr()
|
||||||
|
AssertEqual 2, winnr('$')
|
||||||
|
q
|
||||||
|
Loading…
Reference in New Issue
Block a user