c3ed6e7
To: vim-dev@vim.org
c3ed6e7
Subject: patch 7.0.185
c3ed6e7
Fcc: outbox
c3ed6e7
From: Bram Moolenaar <Bram@moolenaar.net>
c3ed6e7
Mime-Version: 1.0
c3ed6e7
Content-Type: text/plain; charset=ISO-8859-1
c3ed6e7
Content-Transfer-Encoding: 8bit
c3ed6e7
------------
c3ed6e7
c3ed6e7
Patch 7.0.185
c3ed6e7
Problem:    Multi-byte characters in a message are displayed with attributes
c3ed6e7
	    from what comes before it.
c3ed6e7
Solution:   Don't use the attributes for a multi-byte character.  Do use
c3ed6e7
	    attributes for special characters. (Yukihiro Nakadaira)
c3ed6e7
Files:	    src/message.c
c3ed6e7
c3ed6e7
c3ed6e7
*** ../vim-7.0.184/src/message.c	Sat Oct 14 14:33:21 2006
c3ed6e7
--- src/message.c	Sat Jan 13 17:27:31 2007
c3ed6e7
***************
c3ed6e7
*** 1556,1562 ****
c3ed6e7
      int		c_extra = 0;
c3ed6e7
      char_u	*p_extra = NULL;	    /* init to make SASC shut up */
c3ed6e7
      int		n;
c3ed6e7
!     int		attr= 0;
c3ed6e7
      char_u	*trail = NULL;
c3ed6e7
  #ifdef FEAT_MBYTE
c3ed6e7
      int		l;
c3ed6e7
--- 1556,1562 ----
c3ed6e7
      int		c_extra = 0;
c3ed6e7
      char_u	*p_extra = NULL;	    /* init to make SASC shut up */
c3ed6e7
      int		n;
c3ed6e7
!     int		attr = 0;
c3ed6e7
      char_u	*trail = NULL;
c3ed6e7
  #ifdef FEAT_MBYTE
c3ed6e7
      int		l;
c3ed6e7
***************
c3ed6e7
*** 1581,1587 ****
c3ed6e7
  
c3ed6e7
      while (!got_int)
c3ed6e7
      {
c3ed6e7
! 	if (n_extra)
c3ed6e7
  	{
c3ed6e7
  	    --n_extra;
c3ed6e7
  	    if (c_extra)
c3ed6e7
--- 1581,1587 ----
c3ed6e7
  
c3ed6e7
      while (!got_int)
c3ed6e7
      {
c3ed6e7
! 	if (n_extra > 0)
c3ed6e7
  	{
c3ed6e7
  	    --n_extra;
c3ed6e7
  	    if (c_extra)
c3ed6e7
***************
c3ed6e7
*** 1595,1601 ****
c3ed6e7
  	    col += (*mb_ptr2cells)(s);
c3ed6e7
  	    mch_memmove(buf, s, (size_t)l);
c3ed6e7
  	    buf[l] = NUL;
c3ed6e7
! 	    msg_puts_attr(buf, attr);
c3ed6e7
  	    s += l;
c3ed6e7
  	    continue;
c3ed6e7
  	}
c3ed6e7
--- 1595,1601 ----
c3ed6e7
  	    col += (*mb_ptr2cells)(s);
c3ed6e7
  	    mch_memmove(buf, s, (size_t)l);
c3ed6e7
  	    buf[l] = NUL;
c3ed6e7
! 	    msg_puts(buf);
c3ed6e7
  	    s += l;
c3ed6e7
  	    continue;
c3ed6e7
  	}
c3ed6e7
***************
c3ed6e7
*** 1635,1640 ****
c3ed6e7
--- 1635,1643 ----
c3ed6e7
  		p_extra = transchar_byte(c);
c3ed6e7
  		c_extra = NUL;
c3ed6e7
  		c = *p_extra++;
c3ed6e7
+ 		/* Use special coloring to be able to distinguish <hex> from
c3ed6e7
+ 		 * the same in plain text. */
c3ed6e7
+ 		attr = hl_attr(HLF_8);
c3ed6e7
  	    }
c3ed6e7
  	    else if (c == ' ' && trail != NULL && s > trail)
c3ed6e7
  	    {
c3ed6e7
*** ../vim-7.0.184/src/version.c	Tue Jan 16 15:17:43 2007
c3ed6e7
--- src/version.c	Tue Jan 16 15:43:37 2007
c3ed6e7
***************
c3ed6e7
*** 668,669 ****
c3ed6e7
--- 668,671 ----
c3ed6e7
  {   /* Add new patch number below this line */
c3ed6e7
+ /**/
c3ed6e7
+     185,
c3ed6e7
  /**/
c3ed6e7
c3ed6e7
-- 
c3ed6e7
This planet has -- or rather had -- a problem, which was this: most
c3ed6e7
of the people living on it were unhappy for pretty much of the time.
c3ed6e7
Many solutions were suggested for this problem, but most of these
c3ed6e7
were largely concerned with the movements of small green pieces of
c3ed6e7
paper, which is odd because on the whole it wasn't the small green
c3ed6e7
pieces of paper that were unhappy.
c3ed6e7
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
c3ed6e7
c3ed6e7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
c3ed6e7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
c3ed6e7
\\\        download, build and distribute -- http://www.A-A-P.org        ///
c3ed6e7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///