aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/plines.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/plines.c b/src/nvim/plines.c
index 52d7ca9ca0..eca07f0144 100644
--- a/src/nvim/plines.c
+++ b/src/nvim/plines.c
@@ -136,8 +136,10 @@ CharSize charsize_regular(CharsizeArg *csarg, char *const cur, colnr_T const vco
int is_doublewidth = false;
if (use_tabstop) {
size = tabstop_padding(vcol, buf->b_p_ts, buf->b_p_vts_array);
- } else if (*cur == NUL && !has_lcs_eol) {
- size = 0;
+ } else if (*cur == 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;
} else if (cur_char < 0) {
size = kInvalidByteCells;
} else {