vim-patch:8.0.1508: the :drop command is not always available

Problem:    The :drop command is not always available.
Solution:   Include :drop in all builds. (Yasuhiro Matsumoto, closes vim/vim#2639)
5a656864a0
This commit is contained in:
Jan Edmund Lazo 2018-08-16 03:05:35 -04:00
parent b10d822a77
commit 0f9622ca25
2 changed files with 32 additions and 37 deletions

View File

@ -2180,9 +2180,6 @@ func! Test_normal44_textobjects2()
endfunc endfunc
func! Test_normal45_drop() func! Test_normal45_drop()
if !has("dnd")
return
endif
" basic test for :drop command " basic test for :drop command
" unfortunately, without a gui, we can't really test much here, " unfortunately, without a gui, we can't really test much here,
" so simply test that ~p fails (which uses the drop register) " so simply test that ~p fails (which uses the drop register)

View File

@ -42,40 +42,38 @@ function Test_tabpage()
call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green']) call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green'])
tabclose tabclose
if has('nvim') || has('gui') || has('clientserver') " Test for ":tab drop exist-file" to keep current window.
" Test for ":tab drop exist-file" to keep current window. sp test1
sp test1 tab drop test1
tab drop test1 call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1)
call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1) close
close "
" "
" " Test for ":tab drop new-file" to keep current window of tabpage 1.
" Test for ":tab drop new-file" to keep current window of tabpage 1. split
split tab drop newfile
tab drop newfile call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1)
call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1) tabclose
tabclose q
q "
" "
" " Test for ":tab drop multi-opend-file" to keep current tabpage and window.
" Test for ":tab drop multi-opend-file" to keep current tabpage and window. new test1
new test1 tabnew
tabnew new test1
new test1 tab drop test1
tab drop test1 call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1) tabclose
tabclose q
q "
" "
" " Test for ":tab drop vertical-split-window" to jump test1 buffer
" Test for ":tab drop vertical-split-window" to jump test1 buffer tabedit test1
tabedit test1 vnew
vnew tabfirst
tabfirst tab drop test1
tab drop test1 call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)]) 1tabonly
1tabonly
endif
" "
" "
for i in range(9) | tabnew | endfor for i in range(9) | tabnew | endfor