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 | |
parent | bcf7772a23624edc0942120e564f6b4ac95604ad (diff) |
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')
-rw-r--r-- | src/regexp_nfa.c | 7 | ||||
-rw-r--r-- | src/testdir/test64.in | 3 | ||||
-rw-r--r-- | src/testdir/test64.ok | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 4ca29f2440..8b350ab2f7 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"); diff --git a/src/testdir/test64.in b/src/testdir/test64.in index fd19d3af32..360418c503 100644 --- a/src/testdir/test64.in +++ b/src/testdir/test64.in @@ -578,7 +578,7 @@ Gop:" :" Check patterns matching cursor position. :func! Postest() new - call setline(1, ['ffooooo', 'boboooo', 'zoooooo', 'koooooo', 'moooooo', "\t\t\tfoo", 'abababababababfoo', 'bababababababafoo', '********_']) + call setline(1, ['ffooooo', 'boboooo', 'zoooooo', 'koooooo', 'moooooo', "\t\t\tfoo", 'abababababababfoo', 'bababababababafoo', '********_', ' xxxxxxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx']) call setpos('.', [0, 1, 0, 0]) s/\%>3c.//g call setpos('.', [0, 2, 4, 0]) @@ -590,6 +590,7 @@ Gop:" %s/\%>6l\%3c./!/g %s/\%>7l\%12c./?/g %s/\%>7l\%<9l\%>5v\%<8v./#/g + $s/\%(|\u.*\)\@<=[^|\t]\+$//ge 1,$yank quit! endfunc diff --git a/src/testdir/test64.ok b/src/testdir/test64.ok index 92f06ea9f3..c218f8ea17 100644 --- a/src/testdir/test64.ok +++ b/src/testdir/test64.ok @@ -1076,6 +1076,7 @@ moooooo ab!babababababfoo ba!ab##abab?bafoo **!*****_ + ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -1- ffo bob @@ -1086,6 +1087,7 @@ moooooo ab!babababababfoo ba!ab##abab?bafoo **!*****_ + ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -2- ffo bob @@ -1096,6 +1098,7 @@ moooooo ab!babababababfoo ba!ab##abab?bafoo **!*****_ + ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx Test Test END EN diff --git a/src/version.c b/src/version.c index 4d39ea374c..89dd5d7062 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1967, +/**/ 1966, /**/ 1965, |