aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
Commit message (Collapse)AuthorAge
* vim-patch:8.0.0519: character classes not well tested (#8460)KunMing Xie2018-06-01
| | | | | | | | | 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 vim/vim#1560) Update the documentation. https://github.com/vim/vim/commit/0c078fc7db2902d4ccba04506db082ddbef45a8c
* *: Provide list length when allocating listsZyX2018-01-14
|
* regexp: Fix linter errorsZyX2017-12-23
|
* Merge branch 'master' into hide-container-implZyX2017-12-16
|\
| * lintJames McCoy2017-12-15
| |
| * vim-patch:8.0.0074Michael Schupikov2017-12-15
| | | | | | | | | | | | | | | | | | | | Problem: Cannot make Vim fail on an internal error. Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an internal error without mentioning where. https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f Signed-off-by: Michael Schupikov <michael@schupikov.de>
* | *: Finish hiding list implementationZyX2017-12-11
| |
* | *: Hide list implementation in other files as wellZyX2017-12-10
|/
* Move definition of cstrchr above the functions which call itJames McCoy2017-09-23
| | | | | | | | | | Functions with FUNC_ATTR_ALWAYS_INLINE need to be defined before they are called to work around bugs with some compiler versions. When the body is after the use of the function, compilation will fail with /home/niko/build/neovim/src/nvim/regexp.c: In function 'regmatch': /home/niko/build/neovim/build/src/nvim/auto/regexp.c.generated.h:77: sorry, unimplemented: inlining failed in call to 'cstrchr': function body not available /home/niko/build/neovim/src/nvim/regexp.c:4193: sorry, unimplemented: called from here
* vim-patch:8.0.0020Jurica Bradaric2017-07-29
| | | | | | | Problem: The regexp engines are not reentrant. Solution: Add regexec_T and save/restore the state when needed. https://github.com/vim/vim/commit/6100d02aab7c8294b581cb299250eea164b50e9d
* regexp: Silence V595: potential null dereferenceZyX2017-07-04
| | | | The code uses 2-iteration loop antipattern: retval is NULL on first iteration, not NULL on second, yet this is still a false positive.
* Merge #6460 from ZyX-I/1476-changesJustin M. Keyes2017-05-08
|\ | | | | Refactor functions which find character in a string
| * Merge branch 'master' into 1476-changesZyX2017-04-10
| |\
| * | regexp: Update comment in cstrchr()ZyX2017-04-08
| | |
| * | regexp: Do not use locale-dependent functions in cstrchrZyX2017-04-07
| | |
| * | regexp: Refactor cstrchrZyX2017-04-07
| | | | | | | | | | | | Ref #1476
| * | strings: Remove vim_strbyteZyX2017-04-07
| | | | | | | | | | | | Ref #1476
* | | *: Add comment to all C filesZyX2017-04-19
| | |
* | | regexp: Silence octal constant warningZyX2017-04-16
| | |
* | | regexp: Remove another has_mbyte/…-checking stuffZyX2017-04-16
| | |
* | | regexp: Fix warning about octal constantZyX2017-04-16
| |/ |/|
* | lint: fix clint errors around mb_tolower callsBjörn Linse2017-04-10
| |
* | mbyte: replace vim_tolower with mb_tolower handling locale correctlyBjörn Linse2017-04-10
|/
* eval: Move remaining get_tv_string* functions to eval/typval.cZyX2017-03-29
|
* eval: Split eval.c into smaller filesZyX2017-03-29
|
* Allow lambdas to be used with jobs, timers and dictwatchers.Michael Ennen2017-02-14
|
* vim-patch:7.4.2137Michael Ennen2017-02-14
| | | | | | | | | 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. https://github.com/vim/vim/commit/437bafe4c8a83ed71ee006eda7f54b65a90f0d4c
* vim-patch:7.4.2090Michael Ennen2017-02-14
| | | | | | | | 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. https://github.com/vim/vim/commit/df48fb456fb6bf63d94cad9b302ff01d8ee8d311
* vim-patch:7.4.2072Michael Ennen2017-02-14
| | | | | | | Problem: substitute() does not support a Funcref argument. Solution: Support a Funcref like it supports a string starting with "\=". https://github.com/vim/vim/commit/72ab729c3dcdea0fba44d8e676602c847e841bcd
* vim-patch:7.4.1783Michael Ennen2016-12-31
| | | | | | | | Problem: The old regexp engine doesn't handle character classes correctly. (Manuel Ortega) Solution: Use regmbc() instead of regc(). Add a test. https://github.com/vim/vim/commit/af98a49dd0ef1661b4998f118151fddbf6e4df75
* vim-patch:7.4.1793Michael Ennen2016-12-31
| | | | | | | | 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) https://github.com/vim/vim/commit/e8aee7dcf9b12becff86e8ce1783a86801c5f9f6
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* vim-patch:7.4.1305 #5094Michael Ennen2016-08-01
| | | | | | | | | | Problem: "\%1l^#.*" does not match on a line starting with "#". Solution: Do not clear the start-of-line flag. (Christian Brabandt) https://github.com/vim/vim/commit/7c29f387819b5817b003d2ba73e2b5cf3cb3d0dd Helped-by: jamessan Helped-by: mhinz
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* regexp: Remove a leftover line.Jurica Bradaric2016-01-24
| | | | It was replaced with `case 0xc3: case 0xc4: case 0xc5:`.
* vim-patch:7.4.704Jurica Bradaric2016-01-24
| | | | | | | | | | 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. https://github.com/vim/vim/commit/d82a2a990bc329754e1b61c5af669c76ac202497
* vim-patch:7.4.685Jurica Bradaric2016-01-23
| | | | | | | | 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) https://github.com/vim/vim/commit/0e462411cafdd908356792b2c229ab6369103bca
* vim-patch:7.4.714Michael Ennen2016-01-13
| | | | | | | Problem: Illegal memory access when there are illegal bytes. Solution: Check the byte length of the character. (Dominique Pelle) https://github.com/vim/vim/commit/069dd08d8dbbbadc4e6780d5c881a24bce79a4f7
* vim-patch:7.4.776 #3062Marco Hinz2015-08-09
| | | | | | | | Problem: Equivalence class for 'd' does not work correctly. Solution: Fix 0x1e0f and 0x1d0b. (Dominique Pelle) Original patch: https://code.google.com/p/vim/source/detail?r=94b17958585153641ad1e813fa144cad57c7170f
* Remove POSIX 'cpoptions': '\'Michael Reed2015-07-19
|
* vim-patch:7.4.736 #2998cztchoice2015-07-11
| | | | | | | | Problem: Invalid memory access. Solution: Avoid going over the end of a NUL terminated string. (Dominique Pelle) https://github.com/vim/vim/commit/v7-4-736
* vim-patch:7.4.593 #2657David Bürgin2015-06-13
| | | | | | | | | | 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. https://github.com/vim/vim/commit/v7-4-593 See https://groups.google.com/d/msg/vim_dev/c7owwoseba8/ZETgSNZ6p10J
* Remove char_u: message:smsg()Michael Reed2015-05-13
|
* vim-patch:7.4.526 #2562David Bürgin2015-05-07
| | | | | | | | | Problem: matchstr() fails on long text. Daniel Hahler) Solution: Return NFA_TOO_EXPENSIVE from regexec_nl(). (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-526 Helped-by: Michael Reed <m.reed@mykolab.com>
* vim-patch:7.4.519David Bürgin2015-04-27
| | | | | | | | | Problem: Crash when using syntax highlighting. Solution: When regprog is freed and replaced, store the result. https://github.com/vim/vim/tree/v7-4-519 Helped-by: Scott Prager <splinterofchaos@gmail.com>
* Replace vim_isxdigit() with to ascii_isxdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace vim_iswhite with ascii_iswhite() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | We already use wrappers for allocation, the new `xfree` function is the equivalent for deallocation and provides a way to fully replace the malloc implementation used by Neovim.
* vim-patch:7.4.497 #2295David Bürgin2015-04-05
| | | | | | | | | | | | | 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) https://github.com/vim/vim/releases/tag/v7-4-497 Helped-by: David Bürgin <676c7473@gmail.com> Helped-by: Justin M. Keyes <justinkz@gmail.com> Helped-by: Scott Prager <splinterofchaos@gmail.com>