mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.3.425
Problem: Search history lines are duplicated. (Edwin Steiner) Solution: Convert separator character from space to NUL.
This commit is contained in:
@@ -6027,8 +6027,10 @@ read_viminfo_history(virp)
|
|||||||
val = viminfo_readstring(virp, 1, TRUE);
|
val = viminfo_readstring(virp, 1, TRUE);
|
||||||
if (val != NULL && *val != NUL)
|
if (val != NULL && *val != NUL)
|
||||||
{
|
{
|
||||||
|
int sep = (*val == ' ' ? NUL : *val);
|
||||||
|
|
||||||
if (!in_history(type, val + (type == HIST_SEARCH),
|
if (!in_history(type, val + (type == HIST_SEARCH),
|
||||||
viminfo_add_at_front, *val))
|
viminfo_add_at_front, sep))
|
||||||
{
|
{
|
||||||
/* Need to re-allocate to append the separator byte. */
|
/* Need to re-allocate to append the separator byte. */
|
||||||
len = STRLEN(val);
|
len = STRLEN(val);
|
||||||
@@ -6040,7 +6042,7 @@ read_viminfo_history(virp)
|
|||||||
/* Search entry: Move the separator from the first
|
/* Search entry: Move the separator from the first
|
||||||
* column to after the NUL. */
|
* column to after the NUL. */
|
||||||
mch_memmove(p, val + 1, (size_t)len);
|
mch_memmove(p, val + 1, (size_t)len);
|
||||||
p[len] = (*val == ' ' ? NUL : *val);
|
p[len] = sep;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
425,
|
||||||
/**/
|
/**/
|
||||||
424,
|
424,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user