f46c536
To: vim_dev@googlegroups.com
f46c536
Subject: Patch 7.3.110
f46c536
Fcc: outbox
f46c536
From: Bram Moolenaar <Bram@moolenaar.net>
f46c536
Mime-Version: 1.0
f46c536
Content-Type: text/plain; charset=UTF-8
f46c536
Content-Transfer-Encoding: 8bit
f46c536
------------
f46c536
f46c536
Patch 7.3.110
f46c536
Problem:    The "nbsp" item in 'listchars' isn't used for ":list".
f46c536
Solution:   Make it work. (Christian Brabandt)
f46c536
Files:	    src/message.c
f46c536
f46c536
f46c536
*** ../vim-7.3.109/src/message.c	2011-01-17 20:08:03.000000000 +0100
f46c536
--- src/message.c	2011-02-01 17:06:21.000000000 +0100
f46c536
***************
f46c536
*** 1637,1644 ****
f46c536
  	else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)
f46c536
  	{
f46c536
  	    col += (*mb_ptr2cells)(s);
f46c536
! 	    mch_memmove(buf, s, (size_t)l);
f46c536
! 	    buf[l] = NUL;
f46c536
  	    msg_puts(buf);
f46c536
  	    s += l;
f46c536
  	    continue;
f46c536
--- 1637,1652 ----
f46c536
  	else if (has_mbyte && (l = (*mb_ptr2len)(s)) > 1)
f46c536
  	{
f46c536
  	    col += (*mb_ptr2cells)(s);
f46c536
! 	    if (lcs_nbsp != NUL && list && mb_ptr2char(s) == 160)
f46c536
! 	    {
f46c536
! 		mb_char2bytes(lcs_nbsp, buf);
f46c536
! 		buf[(*mb_ptr2len)(buf)] = NUL;
f46c536
! 	    }
f46c536
! 	    else
f46c536
! 	    {
f46c536
! 		mch_memmove(buf, s, (size_t)l);
f46c536
! 		buf[l] = NUL;
f46c536
! 	    }
f46c536
  	    msg_puts(buf);
f46c536
  	    s += l;
f46c536
  	    continue;
f46c536
***************
f46c536
*** 1664,1669 ****
f46c536
--- 1672,1682 ----
f46c536
  		    attr = hl_attr(HLF_8);
f46c536
  		}
f46c536
  	    }
f46c536
+ 	    else if (c == 160 && list && lcs_nbsp != NUL)
f46c536
+ 	    {
f46c536
+ 		c = lcs_nbsp;
f46c536
+ 		attr = hl_attr(HLF_8);
f46c536
+ 	    }
f46c536
  	    else if (c == NUL && list && lcs_eol != NUL)
f46c536
  	    {
f46c536
  		p_extra = (char_u *)"";
f46c536
*** ../vim-7.3.109/src/version.c	2011-02-01 13:59:44.000000000 +0100
f46c536
--- src/version.c	2011-02-01 17:08:31.000000000 +0100
f46c536
***************
f46c536
*** 716,717 ****
f46c536
--- 716,719 ----
f46c536
  {   /* Add new patch number below this line */
f46c536
+ /**/
f46c536
+     110,
f46c536
  /**/
f46c536
f46c536
-- 
f46c536
hundred-and-one symptoms of being an internet addict:
f46c536
176. You lie, even to user-friends, about how long you were online yesterday.
f46c536
f46c536
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
f46c536
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
f46c536
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
f46c536
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///