vim-patch:7.4.722

Problem:    0x202f is not recognized as a non-breaking space character.
Solution:   Add 0x202f to the list. (Christian Brabandt)

73284b973a
This commit is contained in:
Jurica Bradaric
2016-01-24 09:34:43 +01:00
parent 4172ce4eb0
commit 3915ac2409
4 changed files with 8 additions and 5 deletions

View File

@@ -3984,8 +3984,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 conceal:c Character to show in place of concealed text, when
'conceallevel' is set to 1. A space when omitted. 'conceallevel' is set to 1. A space when omitted.
*lcs-nbsp* *lcs-nbsp*
nbsp:c Character to show for a non-breakable space (character nbsp:c Character to show for a non-breakable space character
0xA0, 160). Left blank when omitted. (0xA0 (160 decimal) and U+202F). Left blank when
omitted.
The characters ':' and ',' should not be used. UTF-8 characters can The characters ':' and ',' should not be used. UTF-8 characters can
be used when 'encoding' is "utf-8", otherwise only printable be used when 'encoding' is "utf-8", otherwise only printable

View File

@@ -1396,7 +1396,8 @@ void msg_prt_line(char_u *s, int list)
c = *p_extra++; c = *p_extra++;
} else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1) { } else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1) {
col += (*mb_ptr2cells)(s); 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); mb_char2bytes(lcs_nbsp, buf);
buf[(*mb_ptr2len)(buf)] = NUL; buf[(*mb_ptr2len)(buf)] = NUL;
} else { } else {

View File

@@ -3202,7 +3202,8 @@ win_line (
// 'list': change char 160 to lcs_nbsp and space to lcs_space. // 'list': change char 160 to lcs_nbsp and space to lcs_space.
if (wp->w_p_list if (wp->w_p_list
&& (((c == 160 || (mb_utf8 && mb_c == 160)) && lcs_nbsp) && (((c == 160 || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f)))
&& lcs_nbsp)
|| (c == ' ' && lcs_space && ptr - line <= trailcol))) { || (c == ' ' && lcs_space && ptr - line <= trailcol))) {
c = (c == ' ') ? lcs_space : lcs_nbsp; c = (c == ' ') ? lcs_space : lcs_nbsp;
if (area_attr == 0 && search_attr == 0) { if (area_attr == 0 && search_attr == 0) {

View File

@@ -402,7 +402,7 @@ static int included_patches[] = {
// 725, // 725,
// 724 NA // 724 NA
723, 723,
// 722, 722,
721, 721,
// 720 NA // 720 NA
719, 719,