Mercurial > vim
comparison src/optionstr.c @ 29387:9dce192d1ac2 v9.0.0036
patch 9.0.0036: 'fillchars' cannot have window-local values
Commit: https://github.com/vim/vim/commit/96ba25ac01279f73c0ecb5d4aa4ff37aa359e5eb
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 4 17:34:33 2022 +0100
patch 9.0.0036: 'fillchars' cannot have window-local values
Problem: 'fillchars' cannot have window-local values.
Solution: Make 'fillchars' global-local. (closes https://github.com/vim/vim/issues/5206)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Jul 2022 18:45:04 +0200 |
parents | be6c32395444 |
children | 73fb9c6efc6d |
comparison
equal
deleted
inserted
replaced
29386:f0f3018d296b | 29387:9dce192d1ac2 |
---|---|
1309 { | 1309 { |
1310 errmsg = set_chars_option(curwin, varp); | 1310 errmsg = set_chars_option(curwin, varp); |
1311 if (errmsg == NULL) | 1311 if (errmsg == NULL) |
1312 { | 1312 { |
1313 tabpage_T *tp; | 1313 tabpage_T *tp; |
1314 win_T *wp; | 1314 win_T *wp; |
1315 | 1315 |
1316 // The current window is set to use the global 'listchars' value. | 1316 // The current window is set to use the global 'listchars' value. |
1317 // So clear the window-local value. | 1317 // So clear the window-local value. |
1318 if (!(opt_flags & OPT_GLOBAL)) | 1318 if (!(opt_flags & OPT_GLOBAL)) |
1319 clear_string_option(&curwin->w_p_lcs); | 1319 clear_string_option(&curwin->w_p_lcs); |
1320 FOR_ALL_TAB_WINDOWS(tp, wp) | 1320 FOR_ALL_TAB_WINDOWS(tp, wp) |
1321 // If no error was returned above, we don't expect an error | 1321 // If no error was returned above, we don't expect an error |
1322 // here, so ignore the return value. | 1322 // here, so ignore the return value. |
1323 (void)set_chars_option(wp, &wp->w_p_lcs); | 1323 if (*wp->w_p_lcs == NUL) |
1324 (void)set_chars_option(wp, &wp->w_p_lcs); | |
1324 | 1325 |
1325 redraw_all_later(NOT_VALID); | 1326 redraw_all_later(NOT_VALID); |
1326 } | 1327 } |
1327 } | 1328 } |
1328 | |
1329 // local 'listchars' | 1329 // local 'listchars' |
1330 else if (varp == &curwin->w_p_lcs) | 1330 else if (varp == &curwin->w_p_lcs) |
1331 errmsg = set_chars_option(curwin, varp); | 1331 errmsg = set_chars_option(curwin, varp); |
1332 | 1332 |
1333 // 'fillchars' | 1333 // 'fillchars' |
1334 else if (varp == &p_fcs) | 1334 else if (varp == &p_fcs) |
1335 { | |
1336 errmsg = set_chars_option(curwin, varp); | |
1337 if (errmsg == NULL) | |
1338 { | |
1339 tabpage_T *tp; | |
1340 win_T *wp; | |
1341 | |
1342 // The current window is set to use the global 'fillchars' value. | |
1343 // So clear the window-local value. | |
1344 if (!(opt_flags & OPT_GLOBAL)) | |
1345 clear_string_option(&curwin->w_p_fcs); | |
1346 FOR_ALL_TAB_WINDOWS(tp, wp) | |
1347 // If no error was returned above, we don't expect an error | |
1348 // here, so ignore the return value. | |
1349 if (*wp->w_p_fcs == NUL) | |
1350 (void)set_chars_option(wp, &wp->w_p_fcs); | |
1351 | |
1352 redraw_all_later(NOT_VALID); | |
1353 } | |
1354 } | |
1355 // local 'fillchars' | |
1356 else if (varp == &curwin->w_p_fcs) | |
1335 { | 1357 { |
1336 errmsg = set_chars_option(curwin, varp); | 1358 errmsg = set_chars_option(curwin, varp); |
1337 } | 1359 } |
1338 | 1360 |
1339 #ifdef FEAT_CMDWIN | 1361 #ifdef FEAT_CMDWIN |