Created
November 15, 2014 05:44
-
-
Save mattn/afbe519119e51306da31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 10a119b05204 src/regexp.c | |
--- a/src/regexp.c Thu Nov 13 14:26:09 2014 +0100 | |
+++ b/src/regexp.c Sat Nov 15 14:44:06 2014 +0900 | |
@@ -8186,16 +8186,12 @@ | |
char_u *pat = vim_strsave(((nfa_regprog_T *)rmp->regprog)->pattern); | |
p_re = BACKTRACKING_ENGINE; | |
- vim_regfree(rmp->regprog); | |
if (pat != NULL) | |
{ | |
#ifdef FEAT_EVAL | |
report_re_switch(pat); | |
#endif | |
- rmp->regprog = vim_regcomp(pat, re_flags); | |
- if (rmp->regprog != NULL) | |
- result = rmp->regprog->engine->regexec_nl(rmp, line, col, nl); | |
- vim_free(pat); | |
+ result = rmp->regprog->engine->regexec_nl(rmp, line, col, nl); | |
} | |
p_re = save_p_re; | |
@@ -8256,16 +8252,13 @@ | |
char_u *pat = vim_strsave(((nfa_regprog_T *)rmp->regprog)->pattern); | |
p_re = BACKTRACKING_ENGINE; | |
- vim_regfree(rmp->regprog); | |
if (pat != NULL) | |
{ | |
#ifdef FEAT_EVAL | |
report_re_switch(pat); | |
#endif | |
- rmp->regprog = vim_regcomp(pat, re_flags); | |
- if (rmp->regprog != NULL) | |
- result = rmp->regprog->engine->regexec_multi( | |
- rmp, win, buf, lnum, col, tm); | |
+ result = rmp->regprog->engine->regexec_multi( | |
+ rmp, win, buf, lnum, col, tm); | |
vim_free(pat); | |
} | |
p_re = save_p_re; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment