mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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 #2639)
This commit is contained in:
@@ -711,7 +711,6 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
When using the |:tab| modifier each argument is opened in a
|
||||
tab page. The last window is used if it's empty.
|
||||
Also see |++opt| and |+cmd|.
|
||||
{only available when compiled with a GUI}
|
||||
|
||||
==============================================================================
|
||||
8. Do a command in all buffers or windows *list-repeat*
|
||||
|
@@ -8335,7 +8335,6 @@ ex_smile(exarg_T *eap UNUSED)
|
||||
msg_clr_eos();
|
||||
}
|
||||
|
||||
#if defined(FEAT_GUI) || defined(FEAT_CLIENTSERVER) || defined(PROTO)
|
||||
/*
|
||||
* ":drop"
|
||||
* Opens the first argument in a window. When there are two or more arguments
|
||||
@@ -8415,7 +8414,6 @@ ex_drop(exarg_T *eap)
|
||||
ex_rewind(eap);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Skip over the pattern argument of ":vimgrep /pat/[g][j]".
|
||||
|
@@ -2549,7 +2549,6 @@ get_arglist_exp(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_GUI) || defined(FEAT_CLIENTSERVER) || defined(PROTO)
|
||||
/*
|
||||
* Redefine the argument list.
|
||||
*/
|
||||
@@ -2558,7 +2557,6 @@ set_arglist(char_u *str)
|
||||
{
|
||||
do_arglist(str, AL_SET, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "what" == AL_SET: Redefine the argument list to 'str'.
|
||||
|
@@ -201,9 +201,6 @@ static void ex_wrongmodifier(exarg_T *eap);
|
||||
static void ex_find(exarg_T *eap);
|
||||
static void ex_open(exarg_T *eap);
|
||||
static void ex_edit(exarg_T *eap);
|
||||
#if !defined(FEAT_GUI) && !defined(FEAT_CLIENTSERVER)
|
||||
# define ex_drop ex_ni
|
||||
#endif
|
||||
#ifndef FEAT_GUI
|
||||
# define ex_gui ex_nogui
|
||||
static void ex_nogui(exarg_T *eap);
|
||||
|
@@ -2176,9 +2176,6 @@ func! Test_normal44_textobjects2()
|
||||
endfunc
|
||||
|
||||
func! Test_normal45_drop()
|
||||
if !has("dnd")
|
||||
return
|
||||
endif
|
||||
" basic test for :drop command
|
||||
" unfortunately, without a gui, we can't really test much here,
|
||||
" so simply test that ~p fails (which uses the drop register)
|
||||
|
@@ -41,40 +41,38 @@ function Test_tabpage()
|
||||
call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green'])
|
||||
tabclose
|
||||
|
||||
if has('gui') || has('clientserver')
|
||||
" Test for ":tab drop exist-file" to keep current window.
|
||||
sp test1
|
||||
tab drop test1
|
||||
call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1)
|
||||
close
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop new-file" to keep current window of tabpage 1.
|
||||
split
|
||||
tab drop newfile
|
||||
call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1)
|
||||
tabclose
|
||||
q
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop multi-opend-file" to keep current tabpage and window.
|
||||
new test1
|
||||
tabnew
|
||||
new test1
|
||||
tab drop test1
|
||||
call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
|
||||
tabclose
|
||||
q
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop vertical-split-window" to jump test1 buffer
|
||||
tabedit test1
|
||||
vnew
|
||||
tabfirst
|
||||
tab drop test1
|
||||
call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
|
||||
1tabonly
|
||||
endif
|
||||
" Test for ":tab drop exist-file" to keep current window.
|
||||
sp test1
|
||||
tab drop test1
|
||||
call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1)
|
||||
close
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop new-file" to keep current window of tabpage 1.
|
||||
split
|
||||
tab drop newfile
|
||||
call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1)
|
||||
tabclose
|
||||
q
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop multi-opend-file" to keep current tabpage and window.
|
||||
new test1
|
||||
tabnew
|
||||
new test1
|
||||
tab drop test1
|
||||
call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
|
||||
tabclose
|
||||
q
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop vertical-split-window" to jump test1 buffer
|
||||
tabedit test1
|
||||
vnew
|
||||
tabfirst
|
||||
tab drop test1
|
||||
call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
|
||||
1tabonly
|
||||
"
|
||||
"
|
||||
for i in range(9) | tabnew | endfor
|
||||
|
@@ -771,6 +771,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1508,
|
||||
/**/
|
||||
1507,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user