0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 7.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)
This commit is contained in:
Bram Moolenaar
2015-05-04 10:46:03 +02:00
parent 2186ffa2c7
commit cad2fc9935
2 changed files with 11 additions and 0 deletions

View File

@@ -4279,6 +4279,8 @@ do_sub(eap)
static int do_list = FALSE; /* list last line with subs. */ static int do_list = FALSE; /* list last line with subs. */
static int do_number = FALSE; /* list last line with line nr*/ static int do_number = FALSE; /* list last line with line nr*/
static int do_ic = 0; /* ignore case flag */ 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 */ char_u *pat = NULL, *sub = NULL; /* init for GCC */
int delimiter; int delimiter;
int sublen; int sublen;
@@ -4514,6 +4516,9 @@ do_sub(eap)
if (do_count) if (do_count)
do_ask = FALSE; do_ask = FALSE;
save_do_all = do_all;
save_do_ask = do_ask;
/* /*
* check for a trailing count * check for a trailing count
*/ */
@@ -5327,6 +5332,10 @@ outofmem:
#endif #endif
vim_regfree(regmatch.regprog); vim_regfree(regmatch.regprog);
/* Restore the flag values, they can be used for ":&&". */
do_all = save_do_all;
do_ask = save_do_ask;
} }
/* /*

View File

@@ -741,6 +741,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 */
/**/
716,
/**/ /**/
715, 715,
/**/ /**/