forked from aniani/vim
patch 9.0.1526: condition is always true
Problem: Condition is always true. Solution: Remove unnecessary condition. (closes #12359)
This commit is contained in:
@@ -4658,13 +4658,13 @@ get_encoded_char_adv(char_u **p)
|
|||||||
/*
|
/*
|
||||||
* Handle setting 'listchars' or 'fillchars'.
|
* Handle setting 'listchars' or 'fillchars'.
|
||||||
* "value" points to either the global or the window-local value.
|
* "value" points to either the global or the window-local value.
|
||||||
* "opt_lcs" is TRUE for "listchars" and FALSE for "fillchars".
|
* "is_listchars" is TRUE for "listchars" and FALSE for "fillchars".
|
||||||
* When "apply" is FALSE do not store the flags, only check for errors.
|
* When "apply" is FALSE do not store the flags, only check for errors.
|
||||||
* Assume monocell characters.
|
* Assume monocell characters.
|
||||||
* Returns error message, NULL if it's OK.
|
* Returns error message, NULL if it's OK.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
set_chars_option(win_T *wp, char_u *value, int opt_lcs, int apply)
|
set_chars_option(win_T *wp, char_u *value, int is_listchars, int apply)
|
||||||
{
|
{
|
||||||
int round, i, len, len2, entries;
|
int round, i, len, len2, entries;
|
||||||
char_u *p, *s;
|
char_u *p, *s;
|
||||||
@@ -4673,7 +4673,6 @@ set_chars_option(win_T *wp, char_u *value, int opt_lcs, int apply)
|
|||||||
char_u *last_lmultispace = NULL; // Last occurrence of "leadmultispace:"
|
char_u *last_lmultispace = NULL; // Last occurrence of "leadmultispace:"
|
||||||
int multispace_len = 0; // Length of lcs-multispace string
|
int multispace_len = 0; // Length of lcs-multispace string
|
||||||
int lead_multispace_len = 0; // Length of lcs-leadmultispace string
|
int lead_multispace_len = 0; // Length of lcs-leadmultispace string
|
||||||
int is_listchars = opt_lcs;
|
|
||||||
|
|
||||||
struct charstab
|
struct charstab
|
||||||
{
|
{
|
||||||
@@ -4720,14 +4719,14 @@ set_chars_option(win_T *wp, char_u *value, int opt_lcs, int apply)
|
|||||||
tab = lcstab;
|
tab = lcstab;
|
||||||
CLEAR_FIELD(lcs_chars);
|
CLEAR_FIELD(lcs_chars);
|
||||||
entries = ARRAY_LENGTH(lcstab);
|
entries = ARRAY_LENGTH(lcstab);
|
||||||
if (opt_lcs && wp->w_p_lcs[0] == NUL)
|
if (wp->w_p_lcs[0] == NUL)
|
||||||
value = p_lcs; // local value is empty, use the global value
|
value = p_lcs; // local value is empty, use the global value
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tab = filltab;
|
tab = filltab;
|
||||||
entries = ARRAY_LENGTH(filltab);
|
entries = ARRAY_LENGTH(filltab);
|
||||||
if (!opt_lcs && wp->w_p_fcs[0] == NUL)
|
if (wp->w_p_fcs[0] == NUL)
|
||||||
value = p_fcs; // local value is empty, us the global value
|
value = p_fcs; // local value is empty, us the global value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1526,
|
||||||
/**/
|
/**/
|
||||||
1525,
|
1525,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user