To: vim-dev@vim.org Subject: Patch 6.1.320 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.320 (depends on 6.1.313) Problem: When a ":drop one\ file" command is used the file "one\ file" is opened, the backslash is not removed. (Taro Muraoka) Solution: Handle backslashes correctly. Always set the argument list to keep it simple. Files: runtime/doc/windows.txt, src/ex_cmds.c *** ../vim61.319/runtime/doc/windows.txt Sat Feb 1 16:43:17 2003 --- runtime/doc/windows.txt Tue Feb 4 22:26:22 2003 *************** *** 1,4 **** ! *windows.txt* For Vim version 6.1. Last change: 2003 Feb 01 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *windows.txt* For Vim version 6.1. Last change: 2003 Feb 04 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 588,601 **** *:dr* *:drop* :dr[op] {file} .. ! Edit the first file in a window. - If the file is already open in a window change to that window. - 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. ! When there are two or more arguments 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. {only available when compiled with the +gui feature} --- 588,600 ---- *:dr* *:drop* :dr[op] {file} .. ! Edit the first {file} in a window. - If the file is already open in a window change to that window. - 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. {only available when compiled with the +gui feature} *** ../vim61.319/src/ex_cmds.c Sat Feb 1 16:43:17 2003 --- src/ex_cmds.c Tue Feb 4 22:23:13 2003 *************** *** 5659,5664 **** --- 5659,5666 ---- * so, jump to that window. * We would actually need to check all arguments, but that's complicated * and mostly only one file is dropped. + * This also ignores wildcards, since it is very unlikely the user is + * editing a file name with a wildcard character. */ arg = vim_strsave(eap->arg); if (arg != NULL) *************** *** 5684,5696 **** if (incurwin) { ! /* Already editing the file. If there are more redefine the ! * argument list. */ ! if (two_or_more) ! { ! set_arglist(eap->arg); ! curwin->w_arg_idx = 0; ! } vim_free(arg); return; } --- 5686,5694 ---- if (incurwin) { ! /* Already editing the file. Redefine the argument list. */ ! set_arglist(eap->arg); ! curwin->w_arg_idx = 0; vim_free(arg); return; } *************** *** 5718,5750 **** # endif } ! if (two_or_more) { ! /* Fake a ":snext" or ":next" command, redefine the arglist. */ ! if (split) ! { ! eap->cmdidx = CMD_snext; ! eap->cmd[0] = 's'; ! } ! else ! eap->cmdidx = CMD_next; ! ex_next(eap); } else ! { ! /* Fake a ":split" or ":edit" command, don't change the arglist. */ ! # ifdef FEAT_WINDOWS ! if (split) ! { ! eap->cmdidx = CMD_split; ! ex_splitview(eap); ! } ! else ! # endif ! { ! eap->cmdidx = CMD_edit; ! do_exedit(eap, NULL); ! } ! } } #endif --- 5716,5729 ---- # endif } ! /* Fake a ":snext" or ":next" command, redefine the arglist. */ ! if (split) { ! eap->cmdidx = CMD_snext; ! eap->cmd[0] = 's'; } else ! eap->cmdidx = CMD_next; ! ex_next(eap); } #endif *** ../vim61.319/src/version.c Tue Feb 4 20:07:52 2003 --- src/version.c Tue Feb 4 22:28:22 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 320, /**/ -- hundred-and-one symptoms of being an internet addict: 119. You are reading a book and look for the scroll bar to get to the next page. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///