summaryrefslogtreecommitdiff
path: root/src/regexp.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.1.1319: computing function length name in many placesv8.1.1319Bram Moolenaar2019-05-111-2/+2
| | | | | Problem: Computing function length name in many places. Solution: compute name length in call_func().
* patch 8.1.1202: always get regexp debugging logs when building with -DDEBUGv8.1.1202Bram Moolenaar2019-04-251-5/+5
| | | | | Problem: Always get regexp debugging logs when building with -DDEBUG. Solution: By default do not create regexp debugging logs. (Ken Takata)
* patch 8.1.1032: warnings from clang static analyzerv8.1.1032Bram Moolenaar2019-03-211-1/+1
| | | | | Problem: Warnings from clang static analyzer. (Yegappan Lakshmanan) Solution: Fix relevant warnings.
* patch 8.1.1025: checking NULL pointer after additionv8.1.1025Bram Moolenaar2019-03-201-2/+3
| | | | | Problem: Checking NULL pointer after addition. (Coverity) Solution: First check for NULL, then add the column.
* patch 8.1.0989: various small code uglinessv8.1.0989Bram Moolenaar2019-03-021-1/+1
| | | | | | Problem: Various small code ugliness. Solution: Remove pointless NULL checks. Fix function calls. Fix typos. (Dominique Pelle, closes #4060)
* patch 8.1.0985: crash with large number in regexpv8.1.0985Bram Moolenaar2019-02-281-2/+2
| | | | | Problem: Crash with large number in regexp. (Kuang-che Wu) Solution: Check for long becoming negative int. (closes #)
* patch 8.1.0973: pattern with syntax error gives threee error messagesv8.1.0973Bram Moolenaar2019-02-221-1/+6
| | | | | | | Problem: Pattern with syntax error gives threee error messages. (Kuang-che Wu) Solution: Remove outdated internal error. Don't fall back to other engine after an error.
* patch 8.1.0937: invalid memory access in search patternv8.1.0937Bram Moolenaar2019-02-171-1/+1
| | | | | | Problem: Invalid memory access in search pattern. (Kuang-che Wu) Solution: Check for incomplete collation element. (Dominique Pelle, closes #3985)
* patch 8.1.0935: old regexp engine may use invalid bufferv8.1.0935Bram Moolenaar2019-02-161-0/+2
| | | | | | Problem: Old regexp engine may use invalid buffer for 'iskeyword' or uninitialized buffer pointer. (Kuang-che Wu) Solution: Set rex.reg_buf when compiling the pattern. (closes #3972)
* patch 8.1.0934: invalid memory access in search patternv8.1.0934Bram Moolenaar2019-02-161-1/+1
| | | | | Problem: Invalid memory access in search pattern. (Kuang-che Wu) Solution: Check for incomplete equivalence class. (closes #3970)
* patch 8.1.0903: struct uses more bytes than neededv8.1.0903Bram Moolenaar2019-02-121-4/+4
| | | | | Problem: Struct uses more bytes than needed. Solution: Reorder members of regitem_S. (Dominique Pelle, closes #3936)
* patch 8.1.0862: no verbose version of character classesv8.1.0862Bram Moolenaar2019-01-311-0/+32
| | | | | | Problem: No verbose version of character classes. Solution: Add [:ident:], [:keyword:] and [:fname:]. (Ozaki Kiichi, closes #1373)
* patch 8.1.0809: too many #ifdefsv8.1.0809Bram Moolenaar2019-01-241-181/+26
| | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 3.
* patch 8.1.0785: depending on the configuration some functions are unusedv8.1.0785Bram Moolenaar2019-01-201-10/+3
| | | | | | Problem: Depending on the configuration some functions are unused. Solution: Add more #ifdefs, remove unused functions. (Dominique Pelle, closes #3822)
* patch 8.1.0779: argument for message functions is inconsistentv8.1.0779Bram Moolenaar2019-01-191-2/+2
| | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *".
* patch 8.1.0748: using sprintf() instead of semsg()v8.1.0748Bram Moolenaar2019-01-141-17/+14
| | | | | Problem: Using sprintf() instead of semsg(). Solution: Use semsg(). Fix bug with E888. (Ozaki Kiichi, closes #3801)
* patch 8.1.0743: giving error messages is not flexiblev8.1.0743Bram Moolenaar2019-01-131-24/+24
| | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes #3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts.
* patch 8.1.0677: look-behind match may use the wrong line numberv8.1.0677Bram Moolenaar2019-01-011-1/+1
| | | | | | Problem: Look-behind match may use the wrong line number. (Dominique Pelle) Solution: Use the line number in regsave instead of the one in behind_pos, we may be looking at the previous line. (closes #3749)
* patch 8.1.0661: clipboard regexp might be used recursivelyv8.1.0661Bram Moolenaar2018-12-291-0/+9
| | | | | Problem: Clipboard regexp might be used recursively. Solution: Check for recursive use and bail out.
* patch 8.1.0615: get_tv function names are not consistentv8.1.0615Bram Moolenaar2018-12-211-1/+1
| | | | | Problem: Get_tv function names are not consistent. Solution: Rename to tv_get.
* patch 8.1.0443: unnecessary static function prototypesv8.1.0443Bram Moolenaar2018-09-301-18/+0
| | | | | Problem: Unnecessary static function prototypes. Solution: Remove unnecessary prototypes.
* patch 8.1.0194: possibly use of NULL pointerv8.1.0194Bram Moolenaar2018-07-181-2/+10
| | | | | Problem: Possibly use of NULL pointer. (Coverity) Solution: Reset the re_in_use flag earlier.
* patch 8.1.0192: executing regexp recursively fails with a crashv8.1.0192Bram Moolenaar2018-07-171-191/+214
| | | | | Problem: Executing regexp recursively fails with a crash. Solution: Move global variables into "rex".
* patch 8.1.0102: cannot build without syntax highlightingv8.1.0102Bram Moolenaar2018-06-231-0/+4
| | | | | Problem: Cannot build without syntax highlighting. Solution: Add #ifdef around using reg_do_extmatch.
* patch 8.1.0098: segfault when pattern with \z() is very slowv8.1.0098Bram Moolenaar2018-06-231-5/+10
| | | | | | Problem: Segfault when pattern with \z() is very slow. Solution: Check for NULL regprog. Add "nfa_fail" to test_override() to be able to test this. Fix that 'searchhl' resets called_emsg.
* patch 8.0.1517: invalid memory acces with pattern using look-behind matchv8.0.1517Bram Moolenaar2018-02-131-1/+6
| | | | | | Problem: Invalid memory acces with pattern using look-behind match. (Dominique Pelle) Solution: Get a pointer to the right line.
* patch 8.0.1496: clearing a pointer takes two linesv8.0.1496Bram Moolenaar2018-02-101-12/+8
| | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
* 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.