summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-04-21 18:33:48 +0200
committerBram Moolenaar <Bram@vim.org>2015-04-21 18:33:48 +0200
commit79278367337be1e9a12222698642dcce0af1e059 (patch)
treee7ed1960e4cb4fdf3940d7f2212b2c6bf65ca820 /src/screen.c
parent40ce3a4e1f50badb75ca812e26557a9bc5fde8c6 (diff)
downloadvim-git-79278367337be1e9a12222698642dcce0af1e059.tar.gz
patch 7.4.710v7.4.710
Problem: It is not possible to make spaces visibible in list mode. Solution: Add the "space" item to 'listchars'. (David Bürgin, issue 350)
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c12
1 files changed, 7 insertions, 5 deletions
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;