summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2021-11-01 22:44:33 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-01 22:44:33 +0000
commitfd916d654d9731b3515abf7bc1ac12bd3632b601 (patch)
tree539650e9cabba52cdf038384aa2c5052ae952b38
parent8753c1dd2c2a5c2c7ff63a9bfb14cd4b9bb9c87f (diff)
downloadvim-git-fd916d654d9731b3515abf7bc1ac12bd3632b601.tar.gz
patch 8.2.3569: error for :let when vimrc is Vim 9 scriptv8.2.3569
Problem: Error for :let when vimrc is Vim 9 script. Solution: Prepend :legacy in the code for converting arguments. (Christian Brabandt, closes #9068, closes #9077)
-rw-r--r--src/os_win32.c11
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 91bd18a8b..73af6a181 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -7768,11 +7768,14 @@ fix_arg_enc(void)
// Also, unset wildignore to not be influenced by this option.
// The arguments specified in command-line should be kept even if
// encoding options were changed.
- do_cmdline_cmd((char_u *)":let SaVe_ISF = &isf|set isf+=(,)");
- do_cmdline_cmd((char_u *)":let SaVe_WIG = &wig|set wig=");
+ // Use :legacy so that it also works when in Vim9 script.
+ do_cmdline_cmd((char_u *)":legacy let g:SaVe_ISF = &isf|set isf+=(,)");
+ do_cmdline_cmd((char_u *)":legacy let g:SaVe_WIG = &wig|set wig=");
alist_expand(fnum_list, used_alist_count);
- do_cmdline_cmd((char_u *)":let &isf = SaVe_ISF|unlet SaVe_ISF");
- do_cmdline_cmd((char_u *)":let &wig = SaVe_WIG|unlet SaVe_WIG");
+ do_cmdline_cmd(
+ (char_u *)":legacy let &isf = g:SaVe_ISF|unlet g:SaVe_ISF");
+ do_cmdline_cmd(
+ (char_u *)":legacy let &wig = g:SaVe_WIG|unlet g:SaVe_WIG");
}
// If wildcard expansion failed, we are editing the first file of the
diff --git a/src/version.c b/src/version.c
index c42cd2ad2..ea1a790cc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3569,
+/**/
3568,
/**/
3567,