mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.5070: unnecessary code
Problem: Unnecessary code. Solution: Remove code that isn't needed. (closes #10534)
This commit is contained in:
@@ -1997,11 +1997,13 @@ msg_prt_line(char_u *s, int list)
|
|||||||
&& curwin->w_lcs_chars.leadmultispace != NULL)
|
&& curwin->w_lcs_chars.leadmultispace != NULL)
|
||||||
{
|
{
|
||||||
c = curwin->w_lcs_chars.leadmultispace[multispace_pos++];
|
c = curwin->w_lcs_chars.leadmultispace[multispace_pos++];
|
||||||
if (curwin->w_lcs_chars.leadmultispace[multispace_pos] == NUL)
|
if (curwin->w_lcs_chars.leadmultispace[multispace_pos]
|
||||||
|
== NUL)
|
||||||
multispace_pos = 0;
|
multispace_pos = 0;
|
||||||
attr = HL_ATTR(HLF_8);
|
attr = HL_ATTR(HLF_8);
|
||||||
}
|
}
|
||||||
else if (lead != NULL && s <= lead && curwin->w_lcs_chars.lead)
|
else if (lead != NULL && s <= lead
|
||||||
|
&& curwin->w_lcs_chars.lead != NUL)
|
||||||
{
|
{
|
||||||
c = curwin->w_lcs_chars.lead;
|
c = curwin->w_lcs_chars.lead;
|
||||||
attr = HL_ATTR(HLF_8);
|
attr = HL_ATTR(HLF_8);
|
||||||
@@ -2011,14 +2013,6 @@ msg_prt_line(char_u *s, int list)
|
|||||||
c = curwin->w_lcs_chars.trail;
|
c = curwin->w_lcs_chars.trail;
|
||||||
attr = HL_ATTR(HLF_8);
|
attr = HL_ATTR(HLF_8);
|
||||||
}
|
}
|
||||||
else if (list && lead != NULL && s <= lead && in_multispace
|
|
||||||
&& curwin->w_lcs_chars.leadmultispace != NULL)
|
|
||||||
{
|
|
||||||
c = curwin->w_lcs_chars.leadmultispace[multispace_pos++];
|
|
||||||
if (curwin->w_lcs_chars.leadmultispace[multispace_pos] == NUL)
|
|
||||||
multispace_pos = 0;
|
|
||||||
attr = HL_ATTR(HLF_8);
|
|
||||||
}
|
|
||||||
else if (list && in_multispace
|
else if (list && in_multispace
|
||||||
&& curwin->w_lcs_chars.multispace != NULL)
|
&& curwin->w_lcs_chars.multispace != NULL)
|
||||||
{
|
{
|
||||||
|
12
src/screen.c
12
src/screen.c
@@ -4904,6 +4904,7 @@ set_chars_option(win_T *wp, char_u **varp)
|
|||||||
{
|
{
|
||||||
lcs_chars.tab1 = NUL;
|
lcs_chars.tab1 = NUL;
|
||||||
lcs_chars.tab3 = NUL;
|
lcs_chars.tab3 = NUL;
|
||||||
|
|
||||||
if (multispace_len > 0)
|
if (multispace_len > 0)
|
||||||
{
|
{
|
||||||
lcs_chars.multispace = ALLOC_MULT(int, multispace_len + 1);
|
lcs_chars.multispace = ALLOC_MULT(int, multispace_len + 1);
|
||||||
@@ -5028,7 +5029,8 @@ set_chars_option(win_T *wp, char_u **varp)
|
|||||||
s = p + len2 + 1;
|
s = p + len2 + 1;
|
||||||
if (round == 0)
|
if (round == 0)
|
||||||
{
|
{
|
||||||
// Get length of lcsmultispace string in first round
|
// get length of lcs-leadmultispace string in first
|
||||||
|
// round
|
||||||
last_lmultispace = p;
|
last_lmultispace = p;
|
||||||
lead_multispace_len = 0;
|
lead_multispace_len = 0;
|
||||||
while (*s != NUL && *s != ',')
|
while (*s != NUL && *s != ',')
|
||||||
@@ -5039,7 +5041,7 @@ set_chars_option(win_T *wp, char_u **varp)
|
|||||||
++lead_multispace_len;
|
++lead_multispace_len;
|
||||||
}
|
}
|
||||||
if (lead_multispace_len == 0)
|
if (lead_multispace_len == 0)
|
||||||
// lcsmultispace cannot be an empty string
|
// lcs-leadmultispace cannot be an empty string
|
||||||
return e_invalid_argument;
|
return e_invalid_argument;
|
||||||
p = s;
|
p = s;
|
||||||
}
|
}
|
||||||
@@ -5066,10 +5068,8 @@ set_chars_option(win_T *wp, char_u **varp)
|
|||||||
}
|
}
|
||||||
if (tab == lcstab)
|
if (tab == lcstab)
|
||||||
{
|
{
|
||||||
if (wp->w_lcs_chars.multispace != NULL)
|
vim_free(wp->w_lcs_chars.multispace);
|
||||||
vim_free(wp->w_lcs_chars.multispace);
|
vim_free(wp->w_lcs_chars.leadmultispace);
|
||||||
if (wp->w_lcs_chars.leadmultispace != NULL)
|
|
||||||
vim_free(wp->w_lcs_chars.leadmultispace);
|
|
||||||
wp->w_lcs_chars = lcs_chars;
|
wp->w_lcs_chars = lcs_chars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -734,6 +734,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 */
|
||||||
|
/**/
|
||||||
|
5070,
|
||||||
/**/
|
/**/
|
||||||
5069,
|
5069,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user