]> granicus.if.org Git - vim/commitdiff
patch 8.0.1508: the :drop command is not always available v8.0.1508
authorBram Moolenaar <Bram@vim.org>
Mon, 12 Feb 2018 21:08:06 +0000 (22:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 12 Feb 2018 21:08:06 +0000 (22:08 +0100)
Problem:    The :drop command is not always available.
Solution:   Include :drop in all builds. (Yasuhiro Matsumoto, closes #2639)

runtime/doc/windows.txt
src/ex_cmds.c
src/ex_cmds2.c
src/ex_docmd.c
src/testdir/test_normal.vim
src/testdir/test_tabpage.vim
src/version.c

index a8797a1a2d831a18c5188065886f3b5dba1f1f8a..1c25392ccd622df42420237a3b54c90020967347 100644 (file)
@@ -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*
index 11dac062024e26e146792cf6d3b5613813c7c1ea..788e9eb8282395df3ebc1848d1ab3370dc376763 100644 (file)
@@ -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]".
index 8dae69a723ce0a2f33269f9bbe852e17948fd55f..c36435cc1773142627134799706e8b7aaba3ede9 100644 (file)
@@ -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'.
index 3dda3c0952b436c1bb7e1e1f43a4b1b9a81cac31..5825bf1d1b00172339c5ffbf96d46c66dee1524f 100644 (file)
@@ -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);
index 35ab0fb33bce057b4a20d02b694e4237a27e0e3d..05aceb33019af1993afe7d38590a16f435b20cd2 100644 (file)
@@ -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)
index 95e3c135f2ea91b80f6284c06ac983345f950c15..fae95ab98f879309e2cac01e4594bc2a9141e8d8 100644 (file)
@@ -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
index 212e70a1a65589f565ec2b3a877757c48daf9cd1..963e1dcafa1e88635e300dd27a881f046ca29673 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1508,
 /**/
     1507,
 /**/