From 79278367337be1e9a12222698642dcce0af1e059 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 21 Apr 2015 18:33:48 +0200 Subject: =?UTF-8?q?patch=207.4.710=20Problem:=20=20=20=20It=20is=20not=20p?= =?UTF-8?q?ossible=20to=20make=20spaces=20visibible=20in=20list=20mode.=20?= =?UTF-8?q?Solution:=20=20=20Add=20the=20"space"=20item=20to=20'listchars'?= =?UTF-8?q?.=20(David=20B=C3=BCrgin,=20issue=20350)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/screen.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/screen.c') diff --git a/src/screen.c b/src/screen.c index 811882870..f9a847dbd 100644 --- a/src/screen.c +++ b/src/screen.c @@ -4334,14 +4334,16 @@ win_line(wp, lnum, startrow, endrow, nochange) #endif ++ptr; - /* 'list' : change char 160 to lcs_nbsp. */ - if (wp->w_p_list && (c == 160 + /* 'list': change char 160 to lcs_nbsp and space to lcs_space. */ + if (wp->w_p_list + && (((c == 160 #ifdef FEAT_MBYTE - || (mb_utf8 && mb_c == 160) + || (mb_utf8 && mb_c == 160) #endif - ) && lcs_nbsp) + ) && lcs_nbsp) + || (c == ' ' && lcs_space && ptr <= line + trailcol))) { - c = lcs_nbsp; + c = (c == ' ') ? lcs_space : lcs_nbsp; if (area_attr == 0 && search_attr == 0) { n_attr = 1; -- cgit v1.2.1