Mercurial > vim
diff src/insexpand.c @ 23272:a84e7abb0c92 v8.2.2182
patch 8.2.2182: Vim9: value of 'magic' is still relevant
Commit: https://github.com/vim/vim/commit/f4e2099e39ed4d71aed0f9a9579455aed5ec6cc2
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Dec 21 19:59:08 2020 +0100
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 https://github.com/vim/vim/issues/7509)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 21 Dec 2020 20:00:06 +0100 |
parents | b545334ae654 |
children | 1371e21fdc3d |
line wrap: on
line diff
--- a/src/insexpand.c +++ b/src/insexpand.c @@ -1216,7 +1216,7 @@ ins_compl_dictionaries( } else { - regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0); + regmatch.regprog = vim_regcomp(pat, magic_isset() ? RE_MAGIC : 0); if (regmatch.regprog == NULL) goto theend; } @@ -4175,7 +4175,7 @@ quote_meta(char_u *dest, char_u *src, in break; // FALLTHROUGH case '~': - if (!p_magic) // quote these only if magic is set + if (!magic_isset()) // quote these only if magic is set break; // FALLTHROUGH case '\\':