Skip to content

Commit 6100d02

Browse files
committed
patch 8.0.0020
Problem: The regexp engines are not reentrant. Solution: Add regexec_T and save/restore the state when needed.
1 parent 2ec618c commit 6100d02

6 files changed

Lines changed: 466 additions & 408 deletions

File tree

runtime/doc/change.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*change.txt* For Vim version 8.0. Last change: 2016 Sep 11
1+
*change.txt* For Vim version 8.0. Last change: 2016 Oct 02
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -913,8 +913,7 @@ Exceptions:
913913
Substitute with an expression *sub-replace-expression*
914914
*sub-replace-\=* *s/\=*
915915
When the substitute string starts with "\=" the remainder is interpreted as an
916-
expression. This does not work recursively: a |substitute()| function inside
917-
the expression cannot use "\=" for the substitute string.
916+
expression.
918917

919918
The special meaning for characters as mentioned at |sub-replace-special| does
920919
not apply except for "<CR>". A <NL> character is used as a line break, you

runtime/doc/eval.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.0. Last change: 2016 Sep 28
1+
*eval.txt* For Vim version 8.0. Last change: 2016 Oct 02
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6168,9 +6168,9 @@ range({expr} [, {max} [, {stride}]]) *range()*
61686168
*readfile()*
61696169
readfile({fname} [, {binary} [, {max}]])
61706170
Read file {fname} and return a |List|, each line of the file
6171-
as an item. Lines broken at NL characters. Macintosh files
6172-
separated with CR will result in a single long line (unless a
6173-
NL appears somewhere).
6171+
as an item. Lines are broken at NL characters. Macintosh
6172+
files separated with CR will result in a single long line
6173+
(unless a NL appears somewhere).
61746174
All NUL characters are replaced with a NL character.
61756175
When {binary} contains "b" binary mode is used:
61766176
- When the last line ends in a NL an extra empty list item is
@@ -7390,6 +7390,9 @@ submatch({nr}[, {list}]) *submatch()* *E935*
73907390
|substitute()| this list will always contain one or zero
73917391
items, since there are no real line breaks.
73927392

7393+
When substitute() is used recursively only the submatches in
7394+
the current (deepest) call can be obtained.
7395+
73937396
Example: >
73947397
:s/\d\+/\=submatch(0) + 1/
73957398
< This finds the first number in the line and adds one to it.

0 commit comments

Comments
 (0)