aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-10-22 18:16:24 -0700
committerJames McCoy <jamessan@jamessan.com>2016-11-02 20:05:45 -0400
commitb8bb1f6729038bcfbae486114956505ffe423bbf (patch)
treea353cf3cef02c03a3b9e9ee2f4b13012f0bf3bc5 /src/nvim/regexp_nfa.c
parentfdc48cad7d9fe40ad62a0ba995d088c791bc38ab (diff)
downloadrneovim-b8bb1f6729038bcfbae486114956505ffe423bbf.tar.gz
rneovim-b8bb1f6729038bcfbae486114956505ffe423bbf.tar.bz2
rneovim-b8bb1f6729038bcfbae486114956505ffe423bbf.zip
vim-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 vim/vim#867) https://github.com/vim/vim/commit/6747fabc7348bf5f41ccfe851e2be3e900ec8ee0 Helped-by: jamessan
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 35308b7411..384568259f 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -4560,9 +4560,11 @@ static int recursive_regmatch(nfa_state_T *state, nfa_pim_T *pim, nfa_regprog_T
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 REGEXP_DEBUG
log_fd = fopen(NFA_REGEXP_RUN_LOG, "a");