aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index c9a2e147dc..a680599f9b 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -3165,11 +3165,11 @@ win_line (
}
++ptr;
- /* 'list' : change char 160 to lcs_nbsp. */
- if (wp->w_p_list && (c == 160
- || (mb_utf8 && mb_c == 160)
- ) && lcs_nbsp) {
- c = lcs_nbsp;
+ // 'list': change char 160 to lcs_nbsp and space to lcs_space.
+ if (wp->w_p_list
+ && (((c == 160 || (mb_utf8 && mb_c == 160)) && lcs_nbsp)
+ || (c == ' ' && lcs_space && ptr <= line + trailcol))) {
+ c = (c == ' ') ? lcs_space : lcs_nbsp;
if (area_attr == 0 && search_attr == 0) {
n_attr = 1;
extra_attr = hl_attr(HLF_8);