While warning is technically true (cannot enter this case with `state->c`
greater then NFA_Z…9) it makes condition less readable and relies on knownledge
of enum internal structure.
Problem: The example that explains nested backreferences does not work
properly with the new regexp engine. (Harm te Hennepe)
Solution: Also save the end position when adding a state. (closesvim/vim#990)
d563883a1f
When the end character in a range matches a different standard range
(e.g., [0-z]), the range would be incorrectly detected as the class of
the end character (CLASS_az).
Instead of using a fallthrough, immediately FAIL when the end character
doesn't match the expected range.
Problem: Regexp fails to match when using "\>\)\?". (Ramel)
Solution: When a state is already in the list, but addstate_here() is used
and the existing state comes later, add the new state anyway.
16b3578f35
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)
e8aee7dcf9
Problem: New regexp engine does not work properly with EBCDIC.
Solution: Define equivalence class characters. (Owen Leibman)
2a6fa564a3
Although nvim doesn't support EBCDIC systems, this keeps us inline with
upstream code so its easier to merge future patches in this area and
improves the readability of the code.
Problem: Falling back from NFA to old regexp engine does not work properly.
(fritzophrenic)
Solution: Do not restore nfa_match. (Christian Brabandt, closesvim/vim#867)
6747fabc73
Helped-by: jamessan
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
Problem: "\%1l^#.*" does not match on a line starting with "#".
Solution: Do not clear the start-of-line flag. (Christian Brabandt)
7c29f38781
Helped-by: jamessan
Helped-by: mhinz
An extra test in commit 0a116c828d was
introduced, to check for end of string with a call to strlen(). This was
necessary, because an incorrect length for invalid byte sequences was
used to step through the string. This slowed down find_match_text()
compared to vim's version.
To speed up things, the extra check was removed and a sequence length
of 1 for invalid byte sequences is used.
Fixes issue #3486
Problem: Invalid memory access when there are illegal bytes.
Solution: Get the length from the text, not from the character. (Dominique
Pelle)
2186ffa2c7
Problem: Can't match "%>80v" properly for multi-byte characters.
Solution: Multiply the character number by the maximum number of bytes in a
character. (Yasuhiro Matsumoto)
4f36dc3bf7
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.