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