Mercurial > vim
diff src/screen.c @ 6777:a8962f0e0d34 v7.4.710
patch 7.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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 21 Apr 2015 18:33:48 +0200 |
parents | f242cf1f9897 |
children | adb3699fa30c |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -4334,14 +4334,16 @@ win_line(wp, lnum, startrow, endrow, noc #endif ++ptr; - /* 'list' : change char 160 to lcs_nbsp. */ - if (wp->w_p_list && (c == 160 -#ifdef FEAT_MBYTE - || (mb_utf8 && mb_c == 160) -#endif - ) && lcs_nbsp) - { - c = lcs_nbsp; + /* '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) +#endif + ) && lcs_nbsp) + || (c == ' ' && lcs_space && ptr <= line + trailcol))) + { + c = (c == ' ') ? lcs_space : lcs_nbsp; if (area_attr == 0 && search_attr == 0) { n_attr = 1;