0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.0038: 'listchars' test fails

Problem:    'listchars' test fails.
Solution:   Use window-local value after setting the global value
This commit is contained in:
Bram Moolenaar
2022-07-04 18:05:51 +01:00
parent 510f03738d
commit 5ed26faace
2 changed files with 12 additions and 8 deletions

View File

@@ -1313,15 +1313,16 @@ ambw_end:
tabpage_T *tp; tabpage_T *tp;
win_T *wp; win_T *wp;
// The current window is set to use the global 'listchars' value. // If the current window is set to use the global 'listchars'
// So clear the window-local value. // value, clear the window-local value.
if (!(opt_flags & OPT_GLOBAL)) if (!(opt_flags & OPT_GLOBAL))
clear_string_option(&curwin->w_p_lcs); clear_string_option(&curwin->w_p_lcs);
FOR_ALL_TAB_WINDOWS(tp, wp) FOR_ALL_TAB_WINDOWS(tp, wp)
// If the current window has a local value need to apply it
// again, it was changed when setting the global value.
// If no error was returned above, we don't expect an error // If no error was returned above, we don't expect an error
// here, so ignore the return value. // here, so ignore the return value.
if (*wp->w_p_lcs == NUL) (void)set_chars_option(wp, &wp->w_p_lcs);
(void)set_chars_option(wp, &wp->w_p_lcs);
redraw_all_later(NOT_VALID); redraw_all_later(NOT_VALID);
} }
@@ -1339,15 +1340,16 @@ ambw_end:
tabpage_T *tp; tabpage_T *tp;
win_T *wp; win_T *wp;
// The current window is set to use the global 'fillchars' value. // If the current window is set to use the global 'fillchars'
// So clear the window-local value. // value clear the window-local value.
if (!(opt_flags & OPT_GLOBAL)) if (!(opt_flags & OPT_GLOBAL))
clear_string_option(&curwin->w_p_fcs); clear_string_option(&curwin->w_p_fcs);
FOR_ALL_TAB_WINDOWS(tp, wp) FOR_ALL_TAB_WINDOWS(tp, wp)
// If the current window has a local value need to apply it
// again, it was changed when setting the global value.
// If no error was returned above, we don't expect an error // If no error was returned above, we don't expect an error
// here, so ignore the return value. // here, so ignore the return value.
if (*wp->w_p_fcs == NUL) (void)set_chars_option(wp, &wp->w_p_fcs);
(void)set_chars_option(wp, &wp->w_p_fcs);
redraw_all_later(NOT_VALID); redraw_all_later(NOT_VALID);
} }

View File

@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
38,
/**/ /**/
37, 37,
/**/ /**/