mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:9.0.0038: 'listchars' test fails
Problem: 'listchars' test fails.
Solution: Use window-local value after setting the global value
5ed26faace
This commit is contained in:
@@ -952,17 +952,17 @@ char *did_set_string_option(int opt_idx, char_u **varp, char_u *oldval, char *er
|
|||||||
} else if (varp == &p_lcs) { // global 'listchars'
|
} else if (varp == &p_lcs) { // global 'listchars'
|
||||||
errmsg = set_chars_option(curwin, varp, false);
|
errmsg = set_chars_option(curwin, varp, false);
|
||||||
if (errmsg == NULL) {
|
if (errmsg == NULL) {
|
||||||
// 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, (char_u **)&wp->w_p_lcs, true);
|
||||||
(void)set_chars_option(wp, (char_u **)&wp->w_p_lcs, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
redraw_all_later(UPD_NOT_VALID);
|
redraw_all_later(UPD_NOT_VALID);
|
||||||
}
|
}
|
||||||
@@ -971,17 +971,17 @@ char *did_set_string_option(int opt_idx, char_u **varp, char_u *oldval, char *er
|
|||||||
} else if (varp == &p_fcs) { // global 'fillchars'
|
} else if (varp == &p_fcs) { // global 'fillchars'
|
||||||
errmsg = set_chars_option(curwin, varp, false);
|
errmsg = set_chars_option(curwin, varp, false);
|
||||||
if (errmsg == NULL) {
|
if (errmsg == NULL) {
|
||||||
// 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, (char_u **)&wp->w_p_fcs, true);
|
||||||
(void)set_chars_option(wp, (char_u **)&wp->w_p_fcs, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
redraw_all_later(UPD_NOT_VALID);
|
redraw_all_later(UPD_NOT_VALID);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user