Skip to content

Commit 5ed26fa

Browse files
committed
patch 9.0.0038: 'listchars' test fails
Problem: 'listchars' test fails. Solution: Use window-local value after setting the global value
1 parent 510f037 commit 5ed26fa

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

src/optionstr.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,15 +1313,16 @@ did_set_string_option(
13131313
tabpage_T *tp;
13141314
win_T *wp;
13151315

1316-
// The current window is set to use the global 'listchars' value.
1317-
// So clear the window-local value.
1316+
// If the current window is set to use the global 'listchars'
1317+
// value, clear the window-local value.
13181318
if (!(opt_flags & OPT_GLOBAL))
13191319
clear_string_option(&curwin->w_p_lcs);
13201320
FOR_ALL_TAB_WINDOWS(tp, wp)
1321+
// If the current window has a local value need to apply it
1322+
// again, it was changed when setting the global value.
13211323
// If no error was returned above, we don't expect an error
13221324
// here, so ignore the return value.
1323-
if (*wp->w_p_lcs == NUL)
1324-
(void)set_chars_option(wp, &wp->w_p_lcs);
1325+
(void)set_chars_option(wp, &wp->w_p_lcs);
13251326

13261327
redraw_all_later(NOT_VALID);
13271328
}
@@ -1339,15 +1340,16 @@ did_set_string_option(
13391340
tabpage_T *tp;
13401341
win_T *wp;
13411342

1342-
// The current window is set to use the global 'fillchars' value.
1343-
// So clear the window-local value.
1343+
// If the current window is set to use the global 'fillchars'
1344+
// value clear the window-local value.
13441345
if (!(opt_flags & OPT_GLOBAL))
13451346
clear_string_option(&curwin->w_p_fcs);
13461347
FOR_ALL_TAB_WINDOWS(tp, wp)
1348+
// If the current window has a local value need to apply it
1349+
// again, it was changed when setting the global value.
13471350
// If no error was returned above, we don't expect an error
13481351
// here, so ignore the return value.
1349-
if (*wp->w_p_fcs == NUL)
1350-
(void)set_chars_option(wp, &wp->w_p_fcs);
1352+
(void)set_chars_option(wp, &wp->w_p_fcs);
13511353

13521354
redraw_all_later(NOT_VALID);
13531355
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ static char *(features[]) =
735735

736736
static int included_patches[] =
737737
{ /* Add new patch number below this line */
738+
/**/
739+
38,
738740
/**/
739741
37,
740742
/**/

0 commit comments

Comments
 (0)