mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
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 vim/vim#7509)
f4e2099e39
EX_NONWHITE_OK is N/A: only applies to Vim9 script.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -5147,6 +5147,20 @@ int fill_culopt_flags(char *val, win_T *wp)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/// Get the value of 'magic' taking "magic_overruled" into account.
|
||||
bool magic_isset(void)
|
||||
{
|
||||
switch (magic_overruled) {
|
||||
case MAGIC_ON:
|
||||
return true;
|
||||
case MAGIC_OFF:
|
||||
return false;
|
||||
case MAGIC_NOT_SET:
|
||||
break;
|
||||
}
|
||||
return p_magic;
|
||||
}
|
||||
|
||||
/// Set the callback function value for an option that accepts a function name,
|
||||
/// lambda, et al. (e.g. 'operatorfunc', 'tagfunc', etc.)
|
||||
/// @return OK if the option is successfully set to a function, otherwise FAIL
|
||||
|
Reference in New Issue
Block a user