mirror of
https://github.com/vim/vim.git
synced 2025-11-16 23:24:03 -05:00
patch 9.1.0835: :setglobal doesn't work properly for 'ffu' and 'tsrfu'
Problem: :setglobal doesn't work properly for 'ffu' and 'tsrfu' when
the local value is set (after v9.1.0831)
Solution: Check os_flags instead of buffer option variable (zeertzjq).
closes: #15980
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
ca6231b8a6
commit
6eda269600
@@ -2687,16 +2687,17 @@ did_set_thesaurusfunc(optset_T *args UNUSED)
|
||||
{
|
||||
int retval;
|
||||
|
||||
if (*curbuf->b_p_tsrfu != NUL)
|
||||
{
|
||||
if (args->os_flags & OPT_LOCAL)
|
||||
// buffer-local option set
|
||||
retval = option_set_callback_func(curbuf->b_p_tsrfu,
|
||||
&curbuf->b_tsrfu_cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
// global option set
|
||||
retval = option_set_callback_func(p_tsrfu, &tsrfu_cb);
|
||||
// when using :set, free the local callback
|
||||
if (!(args->os_flags & OPT_GLOBAL))
|
||||
free_callback(&curbuf->b_tsrfu_cb);
|
||||
}
|
||||
|
||||
return retval == FAIL ? e_invalid_argument : NULL;
|
||||
|
||||
Reference in New Issue
Block a user