]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.110 v7.3.110
authorBram Moolenaar <Bram@vim.org>
Tue, 1 Feb 2011 16:12:25 +0000 (17:12 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 1 Feb 2011 16:12:25 +0000 (17:12 +0100)
Problem:    The "nbsp" item in 'listchars' isn't used for ":list".
Solution:   Make it work. (Christian Brabandt)

src/message.c
src/version.c

index 00947250489cdde4ec8bc121d6618dbfc0be1652..07e734be9f6426c29078c9f21cc7c2fa42dc4f6b 100644 (file)
@@ -1637,8 +1637,16 @@ msg_prt_line(s, list)
        else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)
        {
            col += (*mb_ptr2cells)(s);
-           mch_memmove(buf, s, (size_t)l);
-           buf[l] = NUL;
+           if (lcs_nbsp != NUL && list && mb_ptr2char(s) == 160)
+           {
+               mb_char2bytes(lcs_nbsp, buf);
+               buf[(*mb_ptr2len)(buf)] = NUL;
+           }
+           else
+           {
+               mch_memmove(buf, s, (size_t)l);
+               buf[l] = NUL;
+           }
            msg_puts(buf);
            s += l;
            continue;
@@ -1664,6 +1672,11 @@ msg_prt_line(s, list)
                    attr = hl_attr(HLF_8);
                }
            }
+           else if (c == 160 && list && lcs_nbsp != NUL)
+           {
+               c = lcs_nbsp;
+               attr = hl_attr(HLF_8);
+           }
            else if (c == NUL && list && lcs_eol != NUL)
            {
                p_extra = (char_u *)"";
index a1c695393603e213fe6d66ec110ccefddb2818f6..d635dfee90f4f9515d38d1d6baaaa9444c47cc1a 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    110,
 /**/
     109,
 /**/