diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-28 22:39:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-28 22:39:16 +0200 |
commit | 6747fabc7348bf5f41ccfe851e2be3e900ec8ee0 (patch) | |
tree | 61a1a1b86636ef4e9073c81768b0b654fdb936c9 /src/regexp_nfa.c | |
parent | bcf7772a23624edc0942120e564f6b4ac95604ad (diff) | |
download | vim-git-6747fabc7348bf5f41ccfe851e2be3e900ec8ee0.tar.gz |
patch 7.4.1967v7.4.1967
Problem: Falling back from NFA to old regexp engine does not work properly.
(fritzophrenic)
Solution: Do not restore nfa_match. (Christian Brabandt, closes #867)
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 4ca29f244..8b350ab2f 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -5209,9 +5209,12 @@ recursive_regmatch( if (REG_MULTI) regline = reg_getline(reglnum); reginput = regline + save_reginput_col; - nfa_match = save_nfa_match; + if (result != NFA_TOO_EXPENSIVE) + { + nfa_match = save_nfa_match; + nfa_listid = save_nfa_listid; + } nfa_endp = save_nfa_endp; - nfa_listid = save_nfa_listid; #ifdef ENABLE_LOG log_fd = fopen(NFA_REGEXP_RUN_LOG, "a"); |