1
0
forked from aniani/vim

patch 9.0.0036: 'fillchars' cannot have window-local values

Problem:    'fillchars' cannot have window-local values.
Solution:   Make 'fillchars' global-local. (closes #5206)
This commit is contained in:
Bram Moolenaar
2022-07-04 17:34:33 +01:00
parent 54e5fed6d2
commit 96ba25ac01
19 changed files with 275 additions and 142 deletions

View File

@@ -1311,7 +1311,7 @@ ambw_end:
if (errmsg == NULL)
{
tabpage_T *tp;
win_T *wp;
win_T *wp;
// The current window is set to use the global 'listchars' value.
// So clear the window-local value.
@@ -1320,18 +1320,40 @@ ambw_end:
FOR_ALL_TAB_WINDOWS(tp, wp)
// If no error was returned above, we don't expect an error
// here, so ignore the return value.
(void)set_chars_option(wp, &wp->w_p_lcs);
if (*wp->w_p_lcs == NUL)
(void)set_chars_option(wp, &wp->w_p_lcs);
redraw_all_later(NOT_VALID);
}
}
// local 'listchars'
else if (varp == &curwin->w_p_lcs)
errmsg = set_chars_option(curwin, varp);
// 'fillchars'
else if (varp == &p_fcs)
{
errmsg = set_chars_option(curwin, varp);
if (errmsg == NULL)
{
tabpage_T *tp;
win_T *wp;
// The current window is set to use the global 'fillchars' value.
// So clear the window-local value.
if (!(opt_flags & OPT_GLOBAL))
clear_string_option(&curwin->w_p_fcs);
FOR_ALL_TAB_WINDOWS(tp, wp)
// If no error was returned above, we don't expect an error
// here, so ignore the return value.
if (*wp->w_p_fcs == NUL)
(void)set_chars_option(wp, &wp->w_p_fcs);
redraw_all_later(NOT_VALID);
}
}
// local 'fillchars'
else if (varp == &curwin->w_p_fcs)
{
errmsg = set_chars_option(curwin, varp);
}