summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-05-04 17:28:22 +0200
committerBram Moolenaar <Bram@vim.org>2015-05-04 17:28:22 +0200
commit73284b973a013692dd1055cf210f3138a7f3c497 (patch)
treee9051bf75f584a9fc43cc6839fc9513dfc7cd959
parentd59c099120919d2d77b431308e390f86c594c825 (diff)
downloadvim-git-7.4.722.tar.gz
patch 7.4.722v7.4.722
Problem: 0x202f is not recognized as a non-breaking space character. Solution: Add 0x202f to the list. (Christian Brabandt)
-rw-r--r--runtime/doc/options.txt5
-rw-r--r--src/message.c4
-rw-r--r--src/screen.c2
-rw-r--r--src/version.c2
4 files changed, 9 insertions, 4 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index a3f6e1265..21cf6503f 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -4746,8 +4746,9 @@ A jump table for the options with a short description can be found at |Q_op|.
conceal:c Character to show in place of concealed text, when
'conceallevel' is set to 1.
*lcs-nbsp*
- nbsp:c Character to show for a non-breakable space (character
- 0xA0, 160). Left blank when omitted.
+ nbsp:c Character to show for a non-breakable space character
+ (0xA0 (160 decimal) and U+202F). Left blank when
+ omitted.
The characters ':' and ',' should not be used. UTF-8 characters can
be used when 'encoding' is "utf-8", otherwise only printable
diff --git a/src/message.c b/src/message.c
index b046ac95e..2ab0a831d 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1697,7 +1697,9 @@ msg_prt_line(s, list)
else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)
{
col += (*mb_ptr2cells)(s);
- if (lcs_nbsp != NUL && list && mb_ptr2char(s) == 160)
+ if (lcs_nbsp != NUL && list
+ && (mb_ptr2char(s) == 160
+ || mb_ptr2char(s) == 0x202f))
{
mb_char2bytes(lcs_nbsp, buf);
buf[(*mb_ptr2len)(buf)] = NUL;
diff --git a/src/screen.c b/src/screen.c
index e210ec8c9..3f3123adb 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4338,7 +4338,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (wp->w_p_list
&& (((c == 160
#ifdef FEAT_MBYTE
- || (mb_utf8 && mb_c == 160)
+ || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f))
#endif
) && lcs_nbsp)
|| (c == ' ' && lcs_space && ptr - line <= trailcol)))
diff --git a/src/version.c b/src/version.c
index 1be013492..694d84431 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 722,
+/**/
721,
/**/
720,