summaryrefslogtreecommitdiff
path: root/src/regexp.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.0.1254: undefined left shift in gethexchrs()v8.0.1254Bram Moolenaar2017-11-021-15/+15
| | | | | Problem: Undefined left shift in gethexchrs(). (geeknik) Solution: Use unsigned long. (idea by Christian Brabandt, closes #2255)
* patch 8.0.1215: newer gcc warns for implicit fallthroughv8.0.1215Bram Moolenaar2017-10-241-6/+6
| | | | | Problem: Newer gcc warns for implicit fallthrough. Solution: Consistently use a FALLTHROUGH comment. (Christian Brabandt)
* patch 8.0.0647: syntax highlighting can make cause a freezev8.0.0647Bram Moolenaar2017-06-181-10/+6
| | | | | Problem: Syntax highlighting can make cause a freeze. Solution: Apply 'redrawtime' to syntax highlighting, per window.
* patch 8.0.0646: the hlsearch test fails on fast systemsv8.0.0646Bram Moolenaar2017-06-171-9/+32
| | | | | | Problem: The hlsearch test fails on fast systems. Solution: Make the search pattern slower. Fix that the old regexp engine doesn't timeout properly.
* patch 8.0.0645: no error for illegal back reference in NFA enginev8.0.0645Bram Moolenaar2017-06-171-18/+30
| | | | | | Problem: The new regexp engine does not give an error for using a back reference where it is not allowed. (Dominique Pelle) Solution: Check the back reference like the old engine. (closes #1774)
* patch 8.0.0643: when a pattern search is slow Vim becomes unusablev8.0.0643Bram Moolenaar2017-06-171-8/+16
| | | | | | | | Problem: When 'hlsearch' is set and matching with the last search pattern is very slow, Vim becomes unusable. Cannot quit search by pressing CTRL-C. Solution: When the search times out set a flag and don't try again. Check for timeout and CTRL-C in NFA loop that adds states.
* patch 8.0.0624: warning for unused variable in tiny buildv8.0.0624Bram Moolenaar2017-06-051-0/+2
| | | | | Problem: Warning for unused variable in tiny build. (Tony Mechelynck) Solution: Add an #ifdef.
* patch 8.0.0623: error for invalid regexp is not very informativev8.0.0623Bram Moolenaar2017-06-051-3/+5
| | | | | Problem: The message "Invalid range" is used for multiple errors. Solution: Add two more specific error messages. (Itchyny, Ken Hamada)
* patch 8.0.0520: using a function pointer while the function is knownv8.0.0520Bram Moolenaar2017-03-291-3/+3
| | | | | | | Problem: Using a function pointer instead of the actual function, which we know. Solution: Change mb_ functions to utf_ functions when already checked for Unicode. (Dominique Pelle, closes #1582)
* patch 8.0.0519: character classes are not well testedv8.0.0519Bram Moolenaar2017-03-291-3/+3
| | | | | | | | | Problem: Character classes are not well tested. They can differ between platforms. Solution: Add tests. In the documentation make clear which classes depend on what library function. Only use :cntrl: and :graph: for ASCII. (Kazunobu Kuriyama, Dominique Pelle, closes #1560) Update the documentation.
* patch 8.0.0452: some macros are in lower casev8.0.0452Bram Moolenaar2017-03-121-2/+2
| | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case.
* patch 8.0.0451: some macros are in lower casev8.0.0451Bram Moolenaar2017-03-121-14/+14
| | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice.
* patch 8.0.0448: some macros are in lower casev8.0.0448Bram Moolenaar2017-03-121-2/+2
| | | | | Problem: Some macros are in lower case, which can be confusing. Solution: Make a few lower case macros upper case.
* patch 8.0.0074v8.0.0074Bram Moolenaar2016-11-101-2/+4
| | | | | | Problem: Cannot make Vim fail on an internal error. Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an internal error without mentioning where.
* patch 8.0.0020v8.0.0020Bram Moolenaar2016-10-021-305/+357
| | | | | Problem: The regexp engines are not reentrant. Solution: Add regexec_T and save/restore the state when needed.
* patch 7.4.2363v7.4.2363Bram Moolenaar2016-09-111-3/+0
| | | | | Problem: Superfluous function prototypes. Solution: Remove them.
* patch 7.4.2293v7.4.2293Bram Moolenaar2016-08-291-1/+1
| | | | | Problem: Modelines in source code are inconsistant. Solution: Use the same line in most files. Add 'noet'. (Naruhiko Nishino)
* patch 7.4.2137v7.4.2137Bram Moolenaar2016-08-011-1/+1
| | | | | | | Problem: Using function() with a name will find another function when it is redefined. Solution: Add funcref(). Refer to lambda using a partial. Fix several reference counting issues.
* patch 7.4.2090v7.4.2090Bram Moolenaar2016-07-221-10/+67
| | | | | | Problem: Using submatch() in a lambda passed to substitute() is verbose. Solution: Use a static list and pass it as an optional argument to the function. Fix memory leak.
* patch 7.4.2072v7.4.2072Bram Moolenaar2016-07-191-8/+44
| | | | | Problem: substitute() does not support a Funcref argument. Solution: Support a Funcref like it supports a string starting with "\=".
* patch 7.4.1793v7.4.1793Bram Moolenaar2016-04-261-4/+5
| | | | | | Problem: Some character classes may differ between systems. On OS/X the regexp test fails. Solution: Make this less dependent on the system. (idea by Kazunobu Kuriyama)
* patch 7.4.1783v7.4.1783Bram Moolenaar2016-04-241-10/+10
| | | | | | Problem: The old regexp engine doesn't handle character classes correctly. (Manuel Ortega) Solution: Use regmbc() instead of regc(). Add a test.
* patch 7.4.1719v7.4.1719Bram Moolenaar2016-04-081-1/+1
| | | | | | | | Problem: Leaking memory when there is a cycle involving a job and a partial. Solution: Add a copyID to job and channel. Set references in items referred by them. Go through all jobs and channels to find unreferenced items. Also, decrement reference counts when garbage collecting.
* patch 7.4.1700v7.4.1700Bram Moolenaar2016-04-031-2/+2
| | | | | Problem: Equivalence classes are not properly tested. Solution: Add tests for multi-byte and latin1. Fix an error. (Owen Leibman)
* patch 7.4.1399v7.4.1399Bram Moolenaar2016-02-231-6/+0
| | | | | Problem: The MS-DOS code does not build. Solution: Remove the old MS-DOS code.
* patch 7.4.1305v7.4.1305Bram Moolenaar2016-02-121-4/+9
| | | | | Problem: "\%1l^#.*" does not match on a line starting with "#". Solution: Do not clear the start-of-line flag. (Christian Brabandt)
* patch 7.4.1213v7.4.1213Bram Moolenaar2016-01-301-258/+165
| | | | | | Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
* patch 7.4.1200v7.4.1200Bram Moolenaar2016-01-291-6/+0
| | | | | Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
* patch 7.4.1199v7.4.1199Bram Moolenaar2016-01-291-83/+83
| | | | | Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
* patch 7.4.822v7.4.822Bram Moolenaar2015-08-111-2/+2
| | | | | Problem: More problems reported by coverity. Solution: Avoid the warnings. (Christian Brabandt)
* patch 7.4.776v7.4.776Bram Moolenaar2015-07-101-3/+3
| | | | | Problem: Equivalence class for 'd' does not work correctly. Solution: Fix 0x1e0f and 0x1d0b. (Dominique Pelle)
* patch 7.4.736v7.4.736Bram Moolenaar2015-06-091-4/+5
| | | | | | Problem: Invalid memory access. Solution: Avoid going over the end of a NUL terminated string. (Dominique Pelle)
* patch 7.4.714v7.4.714Bram Moolenaar2015-05-041-1/+1
| | | | | Problem: Illegal memory access when there are illegal bytes. Solution: Check the byte length of the character. (Dominique Pelle)
* patch 7.4.704v7.4.704Bram Moolenaar2015-04-211-50/+51
| | | | | | | | Problem: Searching for a character matches an illegal byte and causes invalid memory access. (Dominique Pelle) Solution: Do not match an invalid byte when search for a character in a string. Fix equivalence classes using negative numbers, which result in illegal bytes.
* updated for version 7.4.685v7.4.685Bram Moolenaar2015-03-311-1/+2
| | | | | | Problem: When there are illegal utf-8 characters the old regexp engine may go past the end of a string. Solution: Only advance to the end of the string. (Dominique Pelle)
* updated for version 7.4.593v7.4.593Bram Moolenaar2015-01-271-7/+6
| | | | | | Problem: Crash when searching for "x\{0,90000}". (Dominique Pelle) Solution: Bail out from the NFA engine when the max limit is much higher than the min limit.
* updated for version 7.4.526v7.4.526Bram Moolenaar2014-11-201-12/+13
| | | | | Problem: matchstr() fails on long text. Daniel Hahler) Solution: Return NFA_TOO_EXPENSIVE from regexec_nl(). (Christian Brabandt)
* updated for version 7.4.519v7.4.519Bram Moolenaar2014-11-191-0/+26
| | | | | Problem: Crash when using syntax highlighting. Solution: When regprog is freed and replaced, store the result.
* updated for version 7.4.497v7.4.497Bram Moolenaar2014-11-051-25/+113
| | | | | | | Problem: With some regexp patterns the NFA engine uses many states and becomes very slow. To the user it looks like Vim freezes. Solution: When the number of states reaches a limit fall back to the old engine. (Christian Brabandt)
* updated for version 7.4.437v7.4.437Bram Moolenaar2014-09-091-0/+18
| | | | | Problem: New and old regexp engine are not consistent. Solution: Also give an error for "\ze*" for the old regexp engine.
* updated for version 7.4.360v7.4.360Bram Moolenaar2014-07-091-2/+12
| | | | | | Problem: In a regexp pattern a "$" followed by \v or \V is not seen as the end-of-line. Solution: Handle the situation. (Ozaki Kiichi)
* updated for version 7.4.293v7.4.293Bram Moolenaar2014-05-131-2/+19
| | | | | | Problem: It is not possible to ignore composing characters at a specific point in a pattern. Solution: Add the %C item.
* updated for version 7.4.292v7.4.292Bram Moolenaar2014-05-131-13/+19
| | | | | | | | Problem: Searching for "a" does not match accented "a" with new regexp engine, does match with old engine. (David Bürgin) "ca" does not match "ca" with accented "a" with either engine. Solution: Change the old engine, check for following composing character also for single-byte patterns.
* updated for version 7.4.291v7.4.291Bram Moolenaar2014-05-131-2/+2
| | | | | | Problem: Compiler warning for int to pointer of different size when DEBUG is defined. Solution: use smsg() instead of EMSG3().
* updated for version 7.4.262v7.4.262Bram Moolenaar2014-04-231-42/+8
| | | | | Problem: Duplicate code in regexec(). Solution: Add line_lbr flag to regexec_nl().
* updated for version 7.4.261v7.4.261Bram Moolenaar2014-04-231-0/+2
| | | | | | | Problem: When updating the window involves a regexp pattern, an interactive substitute to replace a "\n" with a line break fails. (Ingo Karkat) Solution: Set reg_line_lbr in vim_regsub() and vim_regsub_multi().
* updated for version 7.4.253v7.4.253Bram Moolenaar2014-04-061-1/+2
| | | | | | Problem: Crash when using cpp syntax file with pattern using external match. (Havard Garnes) Solution: Discard match when end column is before start column.
* updated for version 7.4.241v7.4.241Bram Moolenaar2014-04-021-0/+79
| | | | | | Problem: The string returned by submatch() does not distinguish between a NL from a line break and a NL that stands for a NUL character. Solution: Add a second argument to return a list. (ZyX)
* updated for version 7.4.212v7.4.212Bram Moolenaar2014-03-231-5/+1
| | | | | | Problem: Now that the +visual feature is always enabled the #ifdefs for it are not useful. Solution: Remove the checks for FEAT_VISUAL.
* updated for version 7.4.101v7.4.101Bram Moolenaar2013-11-211-1/+4
| | | | | | Problem: Using \1 in pattern goes one line too far. (Bohr Shaw, John Little) Solution: Only advance the match end for the matched characters in the last line.