patch 9.1.1808: Option insecure flags not copied when splitting window

Problem:  Option insecure flags not copied when splitting window.
Solution: Move window-local insecure flags to winopt_T and copy them
          properly (zeertzjq).

closes: #18434

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2025-09-29 19:30:07 +00:00
committed by Christian Brabandt
parent fec5586a45
commit b3740f4b00
15 changed files with 185 additions and 57 deletions

View File

@ -938,8 +938,8 @@ fex_format(
long count,
int c) // character to be inserted
{
int use_sandbox = was_set_insecurely((char_u *)"formatexpr",
OPT_LOCAL);
int use_sandbox = was_set_insecurely(curwin,
(char_u *)"formatexpr", OPT_LOCAL);
int r;
char_u *fex;
sctx_T save_sctx = current_sctx;