mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24: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:
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.tab3 = NUL;
|
||||
|
||||
if (multispace_len > 0)
|
||||
{
|
||||
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;
|
||||
if (round == 0)
|
||||
{
|
||||
// Get length of lcsmultispace string in first round
|
||||
// get length of lcs-leadmultispace string in first
|
||||
// round
|
||||
last_lmultispace = p;
|
||||
lead_multispace_len = 0;
|
||||
while (*s != NUL && *s != ',')
|
||||
@@ -5039,7 +5041,7 @@ set_chars_option(win_T *wp, char_u **varp)
|
||||
++lead_multispace_len;
|
||||
}
|
||||
if (lead_multispace_len == 0)
|
||||
// lcsmultispace cannot be an empty string
|
||||
// lcs-leadmultispace cannot be an empty string
|
||||
return e_invalid_argument;
|
||||
p = s;
|
||||
}
|
||||
@@ -5066,10 +5068,8 @@ set_chars_option(win_T *wp, char_u **varp)
|
||||
}
|
||||
if (tab == lcstab)
|
||||
{
|
||||
if (wp->w_lcs_chars.multispace != NULL)
|
||||
vim_free(wp->w_lcs_chars.multispace);
|
||||
if (wp->w_lcs_chars.leadmultispace != NULL)
|
||||
vim_free(wp->w_lcs_chars.leadmultispace);
|
||||
vim_free(wp->w_lcs_chars.multispace);
|
||||
vim_free(wp->w_lcs_chars.leadmultispace);
|
||||
wp->w_lcs_chars = lcs_chars;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user