]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.425 v7.3.425
authorBram Moolenaar <Bram@vim.org>
Sat, 4 Feb 2012 21:44:32 +0000 (22:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 4 Feb 2012 21:44:32 +0000 (22:44 +0100)
Problem:    Search history lines are duplicated. (Edwin Steiner)
Solution:   Convert separator character from space to NUL.

src/ex_getln.c
src/version.c

index 70acb0ee650006fdda51637d6e9680439bd2e643..80a39cc090eace98beb036c9b9fb9e0c3b6de9b8 100644 (file)
@@ -6027,8 +6027,10 @@ read_viminfo_history(virp)
        val = viminfo_readstring(virp, 1, TRUE);
        if (val != NULL && *val != NUL)
        {
+           int sep = (*val == ' ' ? NUL : *val);
+
            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. */
                len = STRLEN(val);
@@ -6040,7 +6042,7 @@ read_viminfo_history(virp)
                        /* Search entry: Move the separator from the first
                         * column to after the NUL. */
                        mch_memmove(p, val + 1, (size_t)len);
-                       p[len] = (*val == ' ' ? NUL : *val);
+                       p[len] = sep;
                    }
                    else
                    {
index 89ac1d0cdffe092890f1fdb4eeb491b8fc60f276..a63b67cd18e4a41aa43f6e881af37be4814f8c04 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    425,
 /**/
     424,
 /**/