aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Bürgin <676c7473@gmail.com>2015-04-23 06:58:20 +0200
committerJustin M. Keyes <justinkz@gmail.com>2015-04-27 04:58:37 -0400
commit7f0764629495a5e0568ee625e8f89a8121235940 (patch)
treeae26eb62899ba168d10a17159c4fd1f25ae0af3b /src
parented464908e491234e4c474cb0277142f55532944e (diff)
downloadrneovim-7f0764629495a5e0568ee625e8f89a8121235940.tar.gz
rneovim-7f0764629495a5e0568ee625e8f89a8121235940.tar.bz2
rneovim-7f0764629495a5e0568ee625e8f89a8121235940.zip
vim-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) https://github.com/vim/vim/releases/tag/v7-4-710 Closes #2485.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/globals.h1
-rw-r--r--src/nvim/screen.c10
-rw-r--r--src/nvim/version.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index a8c97c800d..832377f488 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -998,6 +998,7 @@ EXTERN int lcs_eol INIT(= '$');
EXTERN int lcs_ext INIT(= NUL);
EXTERN int lcs_prec INIT(= NUL);
EXTERN int lcs_nbsp INIT(= NUL);
+EXTERN int lcs_space INIT(= NUL);
EXTERN int lcs_tab1 INIT(= NUL);
EXTERN int lcs_tab2 INIT(= NUL);
EXTERN int lcs_trail INIT(= NUL);
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);
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 037cf9f71b..50e4033b4b 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -69,7 +69,7 @@ static char *features[] = {
static int included_patches[] = {
//712,
//711,
- //710,
+ 710,
//709,
//708,
//707,