summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-05-04 10:46:03 +0200
committerBram Moolenaar <Bram@vim.org>2015-05-04 10:46:03 +0200
commitcad2fc9935b3a3d9564b4f8d20890b13f14c7d32 (patch)
tree5c8a33a4d4c290a16d5e071ed3aeaa47cff322d5
parent2186ffa2c7d8a9e2cb09316a7ac9e4ade3957c2f (diff)
downloadvim-git-cad2fc9935b3a3d9564b4f8d20890b13f14c7d32.tar.gz
patch 7.4.716v7.4.716
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)
-rw-r--r--src/ex_cmds.c9
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 1abda7423..a238e2d1d 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -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;
}
/*
diff --git a/src/version.c b/src/version.c
index 7a151bf97..abaa995d5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 716,
+/**/
715,
/**/
714,