0
0
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:
zeertzjq
2022-06-09 13:55:28 +01:00
committed by Bram Moolenaar
parent ebb01bdb27
commit b5f0801b1f
3 changed files with 12 additions and 16 deletions

View File

@@ -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;
}