|
Karsten Hopp |
59c864 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
59c864 |
Subject: Patch 7.1.156
|
|
Karsten Hopp |
59c864 |
Fcc: outbox
|
|
Karsten Hopp |
59c864 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
59c864 |
Mime-Version: 1.0
|
|
Karsten Hopp |
59c864 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
59c864 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
59c864 |
------------
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
Patch 7.1.156
|
|
Karsten Hopp |
59c864 |
Problem: Overlapping arguments for strcpy() when expanding command line
|
|
Karsten Hopp |
59c864 |
variables.
|
|
Karsten Hopp |
59c864 |
Solution: Use mch_memmove() instead of STRCPY(). Also fix a few typos.
|
|
Karsten Hopp |
59c864 |
(Dominique Pelle)
|
|
Karsten Hopp |
59c864 |
Files: src/ex_docmd.c
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
*** ../vim-7.1.155/src/ex_docmd.c Fri Oct 19 16:20:09 2007
|
|
Karsten Hopp |
59c864 |
--- src/ex_docmd.c Sat Nov 10 12:39:51 2007
|
|
Karsten Hopp |
59c864 |
***************
|
|
Karsten Hopp |
59c864 |
*** 666,672 ****
|
|
Karsten Hopp |
59c864 |
if (ex_pressedreturn)
|
|
Karsten Hopp |
59c864 |
{
|
|
Karsten Hopp |
59c864 |
/* go up one line, to overwrite the ":<CR>" line, so the
|
|
Karsten Hopp |
59c864 |
! * output doensn't contain empty lines. */
|
|
Karsten Hopp |
59c864 |
msg_row = prev_msg_row;
|
|
Karsten Hopp |
59c864 |
if (prev_msg_row == Rows - 1)
|
|
Karsten Hopp |
59c864 |
msg_row--;
|
|
Karsten Hopp |
59c864 |
--- 666,672 ----
|
|
Karsten Hopp |
59c864 |
if (ex_pressedreturn)
|
|
Karsten Hopp |
59c864 |
{
|
|
Karsten Hopp |
59c864 |
/* go up one line, to overwrite the ":<CR>" line, so the
|
|
Karsten Hopp |
59c864 |
! * output doesn't contain empty lines. */
|
|
Karsten Hopp |
59c864 |
msg_row = prev_msg_row;
|
|
Karsten Hopp |
59c864 |
if (prev_msg_row == Rows - 1)
|
|
Karsten Hopp |
59c864 |
msg_row--;
|
|
Karsten Hopp |
59c864 |
***************
|
|
Karsten Hopp |
59c864 |
*** 2760,2766 ****
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
/*
|
|
Karsten Hopp |
59c864 |
* Isolate the command and search for it in the command table.
|
|
Karsten Hopp |
59c864 |
! * Exeptions:
|
|
Karsten Hopp |
59c864 |
* - the 'k' command can directly be followed by any character.
|
|
Karsten Hopp |
59c864 |
* - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r'
|
|
Karsten Hopp |
59c864 |
* but :sre[wind] is another command, as are :scrip[tnames],
|
|
Karsten Hopp |
59c864 |
--- 2760,2766 ----
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
/*
|
|
Karsten Hopp |
59c864 |
* Isolate the command and search for it in the command table.
|
|
Karsten Hopp |
59c864 |
! * Exceptions:
|
|
Karsten Hopp |
59c864 |
* - the 'k' command can directly be followed by any character.
|
|
Karsten Hopp |
59c864 |
* - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r'
|
|
Karsten Hopp |
59c864 |
* but :sre[wind] is another command, as are :scrip[tnames],
|
|
Karsten Hopp |
59c864 |
***************
|
|
Karsten Hopp |
59c864 |
*** 6677,6683 ****
|
|
Karsten Hopp |
59c864 |
* The list should be allocated using alloc(), as should each item in the
|
|
Karsten Hopp |
59c864 |
* list. This function takes over responsibility for freeing the list.
|
|
Karsten Hopp |
59c864 |
*
|
|
Karsten Hopp |
59c864 |
! * XXX The list is made into the arggument list. This is freed using
|
|
Karsten Hopp |
59c864 |
* FreeWild(), which does a series of vim_free() calls, unless the two defines
|
|
Karsten Hopp |
59c864 |
* __EMX__ and __ALWAYS_HAS_TRAILING_NUL_POINTER are set. In this case, a
|
|
Karsten Hopp |
59c864 |
* routine _fnexplodefree() is used. This may cause problems, but as the drop
|
|
Karsten Hopp |
59c864 |
--- 6677,6683 ----
|
|
Karsten Hopp |
59c864 |
* The list should be allocated using alloc(), as should each item in the
|
|
Karsten Hopp |
59c864 |
* list. This function takes over responsibility for freeing the list.
|
|
Karsten Hopp |
59c864 |
*
|
|
Karsten Hopp |
59c864 |
! * XXX The list is made into the argument list. This is freed using
|
|
Karsten Hopp |
59c864 |
* FreeWild(), which does a series of vim_free() calls, unless the two defines
|
|
Karsten Hopp |
59c864 |
* __EMX__ and __ALWAYS_HAS_TRAILING_NUL_POINTER are set. In this case, a
|
|
Karsten Hopp |
59c864 |
* routine _fnexplodefree() is used. This may cause problems, but as the drop
|
|
Karsten Hopp |
59c864 |
***************
|
|
Karsten Hopp |
59c864 |
*** 7795,7801 ****
|
|
Karsten Hopp |
59c864 |
if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
|
|
Karsten Hopp |
59c864 |
&& !eap->forceit)
|
|
Karsten Hopp |
59c864 |
{
|
|
Karsten Hopp |
59c864 |
! EMSG(_("E747: Cannot change directory, buffer is modifed (add ! to override)"));
|
|
Karsten Hopp |
59c864 |
return;
|
|
Karsten Hopp |
59c864 |
}
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
--- 7795,7801 ----
|
|
Karsten Hopp |
59c864 |
if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
|
|
Karsten Hopp |
59c864 |
&& !eap->forceit)
|
|
Karsten Hopp |
59c864 |
{
|
|
Karsten Hopp |
59c864 |
! EMSG(_("E747: Cannot change directory, buffer is modified (add ! to override)"));
|
|
Karsten Hopp |
59c864 |
return;
|
|
Karsten Hopp |
59c864 |
}
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
***************
|
|
Karsten Hopp |
59c864 |
*** 9391,9397 ****
|
|
Karsten Hopp |
59c864 |
if (src > srcstart && src[-1] == '\\')
|
|
Karsten Hopp |
59c864 |
{
|
|
Karsten Hopp |
59c864 |
*usedlen = 0;
|
|
Karsten Hopp |
59c864 |
! STRCPY(src - 1, src); /* remove backslash */
|
|
Karsten Hopp |
59c864 |
return NULL;
|
|
Karsten Hopp |
59c864 |
}
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
--- 9391,9397 ----
|
|
Karsten Hopp |
59c864 |
if (src > srcstart && src[-1] == '\\')
|
|
Karsten Hopp |
59c864 |
{
|
|
Karsten Hopp |
59c864 |
*usedlen = 0;
|
|
Karsten Hopp |
59c864 |
! mch_memmove(src - 1, src, STRLEN(src) + 1); /* remove backslash */
|
|
Karsten Hopp |
59c864 |
return NULL;
|
|
Karsten Hopp |
59c864 |
}
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
*** ../vim-7.1.155/src/version.c Sat Nov 10 22:50:20 2007
|
|
Karsten Hopp |
59c864 |
--- src/version.c Sun Nov 11 19:15:51 2007
|
|
Karsten Hopp |
59c864 |
***************
|
|
Karsten Hopp |
59c864 |
*** 668,669 ****
|
|
Karsten Hopp |
59c864 |
--- 668,671 ----
|
|
Karsten Hopp |
59c864 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
59c864 |
+ /**/
|
|
Karsten Hopp |
59c864 |
+ 156,
|
|
Karsten Hopp |
59c864 |
/**/
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
--
|
|
Karsten Hopp |
59c864 |
Common sense is what tells you that the world is flat.
|
|
Karsten Hopp |
59c864 |
|
|
Karsten Hopp |
59c864 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
59c864 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
59c864 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
59c864 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|