Mercurial > vim
diff src/regexp_nfa.c @ 9371:3666915cac0b v7.4.1967
commit https://github.com/vim/vim/commit/6747fabc7348bf5f41ccfe851e2be3e900ec8ee0
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 28 22:39:16 2016 +0200
patch 7.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 https://github.com/vim/vim/issues/867)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 28 Jun 2016 22:45:06 +0200 |
parents | 42b228c8701b |
children | 4aead6a9b7a9 |
line wrap: on
line diff
--- 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");