aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-04-27 04:59:45 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-04-27 04:59:45 -0400
commitd9441444afa3e99c8116ad01b11614886aa53524 (patch)
tree4738a37175e40cda2a1d2aac2dfa4bdf2dcaed41 /src
parent5a1a2ba783ba174567ff1c1044b9f0b01b61a0fb (diff)
parent2632dc5890744085e8cb24a644a50f7e32a92c03 (diff)
downloadrneovim-d9441444afa3e99c8116ad01b11614886aa53524.tar.gz
rneovim-d9441444afa3e99c8116ad01b11614886aa53524.tar.bz2
rneovim-d9441444afa3e99c8116ad01b11614886aa53524.zip
Merge #2492 'vim-patch:7.4.710-712'
Diffstat (limited to 'src')
-rw-r--r--src/nvim/globals.h1
-rw-r--r--src/nvim/message.c3
-rw-r--r--src/nvim/option.c1
-rw-r--r--src/nvim/screen.c10
-rw-r--r--src/nvim/version.c10
5 files changed, 20 insertions, 5 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/message.c b/src/nvim/message.c
index 52b023dc5e..5efa9f6549 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1450,6 +1450,9 @@ void msg_prt_line(char_u *s, int list)
} else if (c == ' ' && trail != NULL && s > trail) {
c = lcs_trail;
attr = hl_attr(HLF_8);
+ } else if (c == ' ' && list && lcs_space != NUL) {
+ c = lcs_space;
+ attr = hl_attr(HLF_8);
}
}
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 12118cdebc..7c28064ea0 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -4502,6 +4502,7 @@ static char_u *set_chars_option(char_u **varp)
{&lcs_ext, "extends"},
{&lcs_nbsp, "nbsp"},
{&lcs_prec, "precedes"},
+ {&lcs_space, "space"},
{&lcs_tab2, "tab"},
{&lcs_trail, "trail"},
{&lcs_conceal, "conceal"},
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 d1ba6e473e..a6a86f09d1 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -67,6 +67,16 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
+ 712,
+ 711,
+ 710,
+ //709,
+ //708,
+ //707,
+ //706,
+ //705,
+ //704,
+ //703,
702,
//701,
//700,