diff options
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/screen.c b/src/screen.c index 503587953..cba7e0b2b 100644 --- a/src/screen.c +++ b/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; } |