forked from aniani/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 #7509)
This commit is contained in:
19
src/option.c
19
src/option.c
@@ -6996,3 +6996,22 @@ fill_culopt_flags(char_u *val, win_T *wp)
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Get the value of 'magic' adjusted for Vim9 script.
|
||||
*/
|
||||
int
|
||||
magic_isset(void)
|
||||
{
|
||||
switch (magic_overruled)
|
||||
{
|
||||
case MAGIC_ON: return TRUE;
|
||||
case MAGIC_OFF: return FALSE;
|
||||
case MAGIC_NOT_SET: break;
|
||||
}
|
||||
#ifdef FEAT_EVAL
|
||||
if (in_vim9script())
|
||||
return TRUE;
|
||||
#endif
|
||||
return p_magic;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user