diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-09 17:16:59 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-09 17:16:59 +0100 |
commit | 9ec7026f24e9ac51654300e32afd2b7540cab5f8 (patch) | |
tree | d62d3be5ade6a9957a09ef66e88a37e970552de3 /src/scriptfile.c | |
parent | a7a691cc142439e266f4ceb1f208bb952b57aa71 (diff) | |
download | vim-git-9ec7026f24e9ac51654300e32afd2b7540cab5f8.tar.gz |
patch 8.2.2122: Vim9: crash when sourcing vim9script earlyv8.2.2122
Problem: Vim9: crash when sourcing vim9script early.
Solution: Use set_option_value() instead of setting p_cpo directly.
(closes #7441)
Diffstat (limited to 'src/scriptfile.c')
-rw-r--r-- | src/scriptfile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/scriptfile.c b/src/scriptfile.c index 7e5ea4c63..bf4cbc0ea 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1491,8 +1491,7 @@ almosttheend: si = SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_save_cpo != NULL) { - free_string_option(p_cpo); - p_cpo = si->sn_save_cpo; + set_option_value((char_u *)"cpo", 0L, si->sn_save_cpo, 0); si->sn_save_cpo = NULL; } |