summaryrefslogtreecommitdiffstats
path: root/src/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/charset.c b/src/charset.c
index 919885df07..9f4c0ae828 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1160,8 +1160,12 @@ win_lbr_chartabsize(
* First get the normal size, without 'linebreak' or text properties
*/
size = win_chartabsize(wp, s, vcol);
- if (*s == NUL && !has_lcs_eol)
- size = 0; // NUL is not displayed
+ if (*s == NUL)
+ {
+ // 1 cell for EOL list char (if present), as opposed to the two cell ^@
+ // for a NUL character in the text.
+ size = has_lcs_eol ? 1 : 0;
+ }
# ifdef FEAT_LINEBREAK
int is_doublewidth = has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1;
# endif