diff options
-rw-r--r-- | runtime/doc/options.txt | 5 | ||||
-rw-r--r-- | src/nvim/message.c | 3 | ||||
-rw-r--r-- | src/nvim/screen.c | 3 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 013e7c742c..bbd9cc1e2b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -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 'conceallevel' is set to 1. A space when omitted. *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/nvim/message.c b/src/nvim/message.c index 00f4c0a85c..1dd71baaa4 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1396,7 +1396,8 @@ void msg_prt_line(char_u *s, int list) c = *p_extra++; } 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; } else { diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 9a64a7c3a9..c6d1ea790e 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3202,7 +3202,8 @@ win_line ( // '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 == 160 || (mb_utf8 && (mb_c == 160 || mb_c == 0x202f))) + && lcs_nbsp) || (c == ' ' && lcs_space && ptr - line <= trailcol))) { c = (c == ' ') ? lcs_space : lcs_nbsp; if (area_attr == 0 && search_attr == 0) { diff --git a/src/nvim/version.c b/src/nvim/version.c index edffe357ea..7c7839f7e7 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -402,7 +402,7 @@ static int included_patches[] = { // 725, // 724 NA 723, - // 722, + 722, 721, // 720 NA 719, |