diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-10 15:30:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-10 15:30:32 +0100 |
commit | 2e7cba347fc8b746add12aa5e0e9f6218a76c788 (patch) | |
tree | 8225458b3e9d5a108dd4c57f0e94e5aa736919fd /src/drawline.c | |
parent | b74e04649168aec579183dfef70b8784d2afe993 (diff) | |
download | vim-git-2e7cba347fc8b746add12aa5e0e9f6218a76c788.tar.gz |
patch 8.2.5076: unnecessary codev8.2.5076
Problem: Unnecessary code.
Solution: Remove code and replace with function call. (closes #10552)
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drawline.c b/src/drawline.c index 59c62c79d..51a5fbfab 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -2116,14 +2116,15 @@ win_line( mb_utf8 = FALSE; } - if ((trailcol != MAXCOL && ptr > line + trailcol && c == ' ') - || (leadcol != 0 && ptr < line + leadcol && c == ' ')) + if (c == ' ' && ((trailcol != MAXCOL && ptr > line + trailcol) + || (leadcol != 0 && ptr < line + leadcol))) { if (leadcol != 0 && in_multispace && ptr < line + leadcol && wp->w_lcs_chars.leadmultispace != NULL) { c = wp->w_lcs_chars.leadmultispace[multispace_pos++]; - if (wp->w_lcs_chars.leadmultispace[multispace_pos] == NUL) + if (wp->w_lcs_chars.leadmultispace[multispace_pos] + == NUL) multispace_pos = 0; } @@ -2133,7 +2134,7 @@ win_line( else if (ptr < line + leadcol && wp->w_lcs_chars.lead) c = wp->w_lcs_chars.lead; - else if (leadcol != 0 && c == ' ' && wp->w_lcs_chars.space) + else if (leadcol != 0 && wp->w_lcs_chars.space) c = wp->w_lcs_chars.space; |