aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-01 10:43:14 +0800
committerGitHub <noreply@github.com>2022-02-01 10:43:14 +0800
commit547497b042dccc10de0e144485d36952dbd1182e (patch)
tree51e74fbd45dda0dc49ceb0b47b063d111c80cf4b /src/nvim/regexp.c
parent5205bcc9049a171e90ebd01bbc0367f4ae2371d1 (diff)
parentbba5003bdb628764362d8c4869a1e1999584d716 (diff)
downloadrneovim-547497b042dccc10de0e144485d36952dbd1182e.tar.gz
rneovim-547497b042dccc10de0e144485d36952dbd1182e.tar.bz2
rneovim-547497b042dccc10de0e144485d36952dbd1182e.zip
Merge pull request #17261 from zeertzjq/vim-8.2.4273
vim-patch:8.2.4273: the EBCDIC support is outdated
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index c8508179a1..ba234bc841 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -2901,18 +2901,14 @@ static int peekchr(void)
{
int c = regparse[1];
- if (c == NUL)
- curchr = '\\'; /* trailing '\' */
- else if (
- c <= '~' && META_flags[c]
- ) {
- /*
- * META contains everything that may be magic sometimes,
- * except ^ and $ ("\^" and "\$" are only magic after
- * "\V"). We now fetch the next character and toggle its
- * magicness. Therefore, \ is so meta-magic that it is
- * not in META.
- */
+ if (c == NUL) {
+ curchr = '\\'; // trailing '\'
+ } else if (c <= '~' && META_flags[c]) {
+ // META contains everything that may be magic sometimes,
+ // except ^ and $ ("\^" and "\$" are only magic after
+ // "\V"). We now fetch the next character and toggle its
+ // magicness. Therefore, \ is so meta-magic that it is
+ // not in META.
curchr = -1;
prev_at_start = at_start;
at_start = false; // be able to say "/\*ptr"