diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-07-04 18:05:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-04 18:05:51 +0100 |
commit | 5ed26faace574f6b36744f9e17075d7e806aa877 (patch) | |
tree | f05f2ea85ddd67649d295343bf68b60cda105c89 | |
parent | 510f03738dfcadfe2099c5b6a58cb75f64dbaa82 (diff) | |
download | vim-git-5ed26faace574f6b36744f9e17075d7e806aa877.tar.gz |
patch 9.0.0038: 'listchars' test failsv9.0.0038
Problem: 'listchars' test fails.
Solution: Use window-local value after setting the global value
-rw-r--r-- | src/optionstr.c | 18 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/optionstr.c b/src/optionstr.c index 43b7e5097..1f9a0e5d5 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -1313,15 +1313,16 @@ ambw_end: tabpage_T *tp; win_T *wp; - // The current window is set to use the global 'listchars' value. - // So clear the window-local value. + // If the current window is set to use the global 'listchars' + // value, clear the window-local value. if (!(opt_flags & OPT_GLOBAL)) clear_string_option(&curwin->w_p_lcs); 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 // 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); } @@ -1339,15 +1340,16 @@ ambw_end: tabpage_T *tp; win_T *wp; - // The current window is set to use the global 'fillchars' value. - // So clear the window-local value. + // If the current window is set to use the global 'fillchars' + // value clear the window-local value. if (!(opt_flags & OPT_GLOBAL)) clear_string_option(&curwin->w_p_fcs); 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 // 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); } diff --git a/src/version.c b/src/version.c index 81305060b..8ddbddaf8 100644 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 38, +/**/ 37, /**/ 36, |