diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 08:38:38 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 10:07:04 +0800 |
commit | a91ba088abf7b21f640f671ad7f211c0957b4765 (patch) | |
tree | a1f206ecc559b64767e667945587b324c5ac3e12 /src/nvim/insexpand.c | |
parent | fba0562723a1af143c9e9509920d03d8231b8bf7 (diff) | |
download | rneovim-a91ba088abf7b21f640f671ad7f211c0957b4765.tar.gz rneovim-a91ba088abf7b21f640f671ad7f211c0957b4765.tar.bz2 rneovim-a91ba088abf7b21f640f671ad7f211c0957b4765.zip |
vim-patch:8.2.2182: Vim9: value of 'magic' is still relevant
Problem: Vim9: value of 'magic' is still relevant.
Solution: Always behave like 'magic' is on in Vim9 script (closes vim/vim#7509)
https://github.com/vim/vim/commit/f4e2099e39ed4d71aed0f9a9579455aed5ec6cc2
EX_NONWHITE_OK is N/A: only applies to Vim9 script.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/insexpand.c')
-rw-r--r-- | src/nvim/insexpand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 625e48258c..6531da6419 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -1336,7 +1336,7 @@ static void ins_compl_dictionaries(char_u *dict_start, char_u *pat, int flags, i xfree(pat_esc); xfree(ptr); } else { - regmatch.regprog = vim_regcomp((char *)pat, p_magic ? RE_MAGIC : 0); + regmatch.regprog = vim_regcomp((char *)pat, magic_isset() ? RE_MAGIC : 0); if (regmatch.regprog == NULL) { goto theend; } @@ -4430,7 +4430,7 @@ static unsigned quote_meta(char_u *dest, char_u *src, int len) } FALLTHROUGH; case '~': - if (!p_magic) { // quote these only if magic is set + if (!magic_isset()) { // quote these only if magic is set break; } FALLTHROUGH; |