Patch 9.0.1526
Problem: Condition is always true.
Solution: Remove unnecessary condition. (closes #12359)
Files: src/screen.c
*** ../vim-9.0.1525/src/screen.c 2023-04-17 16:40:54.724586083 +0100
--- src/screen.c 2023-05-08 15:54:57.253864679 +0100
***************
*** 4658,4670 ****
/*
* Handle setting 'listchars' or 'fillchars'.
* "value" points to either the global or the window-local value.
! * "opt_lcs" is TRUE for "listchars" and FALSE for "fillchars".
* When "apply" is FALSE do not store the flags, only check for errors.
* Assume monocell characters.
* Returns error message, NULL if it's OK.
*/
static char *
! set_chars_option(win_T *wp, char_u *value, int opt_lcs, int apply)
{
int round, i, len, len2, entries;
char_u *p, *s;
--- 4658,4670 ----
/*
* Handle setting 'listchars' or 'fillchars'.
* "value" points to either the global or the window-local value.
! * "is_listchars" is TRUE for "listchars" and FALSE for "fillchars".
* When "apply" is FALSE do not store the flags, only check for errors.
* Assume monocell characters.
* Returns error message, NULL if it's OK.
*/
static char *
! set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
{
int round, i, len, len2, entries;
char_u *p, *s;
***************
*** 4673,4679 ****
char_u *last_lmultispace = NULL; // Last occurrence of "leadmultispace:"
int multispace_len = 0; // Length of lcs-multispace string
int lead_multispace_len = 0; // Length of lcs-leadmultispace
string
- int is_listchars = opt_lcs;
struct charstab
{
--- 4673,4678 ----
***************
*** 4720,4733 ****
tab = lcstab;
CLEAR_FIELD(lcs_chars);
entries = ARRAY_LENGTH(lcstab);
! if (opt_lcs && wp->w_p_lcs[0] == NUL)
value = p_lcs; // local value is empty, use the global value
}
else
{
tab = filltab;
entries = ARRAY_LENGTH(filltab);
! if (!opt_lcs && wp->w_p_fcs[0] == NUL)
value = p_fcs; // local value is empty, us the global value
}
--- 4719,4732 ----
tab = lcstab;
CLEAR_FIELD(lcs_chars);
entries = ARRAY_LENGTH(lcstab);
! if (wp->w_p_lcs[0] == NUL)
value = p_lcs; // local value is empty, use the global value
}
else
{
tab = filltab;
entries = ARRAY_LENGTH(filltab);
! if (wp->w_p_fcs[0] == NUL)
value = p_fcs; // local value is empty, us the global value
}
*** ../vim-9.0.1525/src/version.c 2023-05-08 15:50:49.194261284 +0100
--- src/version.c 2023-05-08 15:55:38.925807495 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1526,
/**/
--
hundred-and-one symptoms of being an internet addict:
19. All of your friends have an @ in their names.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20230508145653.929981C1B21%40moolenaar.net.