]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.716 v7.4.716
authorBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 08:46:03 +0000 (10:46 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 08:46:03 +0000 (10:46 +0200)
Problem:    When using the 'c' flag of ":substitute" and selecting "a" or "l"
            at the prompt the flags are not remembered for ":&&". (Ingo
            Karkat)
Solution:   Save the flag values and restore them. (Hirohito Higashi)

src/ex_cmds.c
src/version.c

index 1abda7423b9bbe4b922c97f669843e1be66bbbef..a238e2d1d1be270bfbddcb2bcda8b635e2462922 100644 (file)
@@ -4279,6 +4279,8 @@ do_sub(eap)
     static int do_list = FALSE;        /* list last line with subs. */
     static int do_number = FALSE;      /* list last line with line nr*/
     static int do_ic = 0;              /* ignore case flag */
+    int                save_do_all;            /* remember user specified 'g' flag */
+    int                save_do_ask;            /* remember user specified 'c' flag */
     char_u     *pat = NULL, *sub = NULL;       /* init for GCC */
     int                delimiter;
     int                sublen;
@@ -4514,6 +4516,9 @@ do_sub(eap)
     if (do_count)
        do_ask = FALSE;
 
+    save_do_all = do_all;
+    save_do_ask = do_ask;
+
     /*
      * check for a trailing count
      */
@@ -5327,6 +5332,10 @@ outofmem:
 #endif
 
     vim_regfree(regmatch.regprog);
+
+    /* Restore the flag values, they can be used for ":&&". */
+    do_all = save_do_all;
+    do_ask = save_do_ask;
 }
 
 /*
index 7a151bf97359c909eb959e6f2d28b72e2c82991f..abaa995d56e2f045513116251a8537e5da7b009d 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    716,
 /**/
     715,
 /**/