Patch 8.0.1508
Problem:    The :drop command is not always available.
Solution:   Include :drop in all builds. (Yasuhiro Matsumoto, closes #2639)
Files:      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


*** ../vim-8.0.1507/runtime/doc/windows.txt     2016-09-12 12:45:54.000000000 
+0200
--- runtime/doc/windows.txt     2018-02-12 21:49:22.102338303 +0100
***************
*** 696,708 ****
                - If the file is not open in a window edit the file in the
                  current window.  If the current buffer can't be |abandon|ed,
                  the window is split first.
                The |argument-list| is set, like with the |:next| command.
                The purpose of this command is that it can be used from a
                program that wants Vim to edit another file, e.g., a debugger.
                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*
--- 703,716 ----
                - If the file is not open in a window edit the file in the
                  current window.  If the current buffer can't be |abandon|ed,
                  the window is split first.
+               - Windows that are not in the argument list or are not full
+                 width will be closed if possible.
                The |argument-list| is set, like with the |:next| command.
                The purpose of this command is that it can be used from a
                program that wants Vim to edit another file, e.g., a debugger.
                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|.
  
  ==============================================================================
  8. Do a command in all buffers or windows                     *list-repeat*
*** ../vim-8.0.1507/src/ex_cmds.c       2018-02-10 18:45:21.048822301 +0100
--- src/ex_cmds.c       2018-02-12 21:49:22.106338274 +0100
***************
*** 8335,8341 ****
      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
--- 8335,8340 ----
***************
*** 8415,8421 ****
        ex_rewind(eap);
      }
  }
- #endif
  
  /*
   * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
--- 8414,8419 ----
*** ../vim-8.0.1507/src/ex_cmds2.c      2018-02-11 19:06:20.265418939 +0100
--- src/ex_cmds2.c      2018-02-12 21:49:22.106338274 +0100
***************
*** 2549,2555 ****
  }
  #endif
  
- #if defined(FEAT_GUI) || defined(FEAT_CLIENTSERVER) || defined(PROTO)
  /*
   * Redefine the argument list.
   */
--- 2549,2554 ----
***************
*** 2558,2564 ****
  {
      do_arglist(str, AL_SET, 0);
  }
- #endif
  
  /*
   * "what" == AL_SET: Redefine the argument list to 'str'.
--- 2557,2562 ----
*** ../vim-8.0.1507/src/ex_docmd.c      2018-02-11 19:06:20.269418910 +0100
--- src/ex_docmd.c      2018-02-12 21:49:22.110338245 +0100
***************
*** 201,209 ****
  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);
--- 201,206 ----
*** ../vim-8.0.1507/src/testdir/test_normal.vim 2017-12-20 22:32:16.689158612 
+0100
--- src/testdir/test_normal.vim 2018-02-12 21:49:22.110338245 +0100
***************
*** 2176,2184 ****
  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)
--- 2176,2181 ----
*** ../vim-8.0.1507/src/testdir/test_tabpage.vim        2017-10-26 
21:59:54.004362215 +0200
--- src/testdir/test_tabpage.vim        2018-02-12 21:49:22.110338245 +0100
***************
*** 41,80 ****
    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
    "
    "
    for i in range(9) | tabnew | endfor
--- 41,78 ----
    call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test'  && 
t:val_list == ['red', 'blue', 'green'])
    tabclose
  
!   " 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
*** ../vim-8.0.1507/src/version.c       2018-02-12 21:31:29.678121098 +0100
--- src/version.c       2018-02-12 21:50:58.709632629 +0100
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1508,
  /**/

-- 
ARTHUR:        What?
BLACK KNIGHT:  None shall pass.
ARTHUR:        I have no quarrel with you, good Sir knight, but I must cross
               this bridge.
BLACK KNIGHT:  Then you shall die.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui