Karsten Hopp 2995bf
To: vim-dev@vim.org
Karsten Hopp 2995bf
Subject: Patch 7.2.085
Karsten Hopp 2995bf
Fcc: outbox
Karsten Hopp 2995bf
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 2995bf
Mime-Version: 1.0
Karsten Hopp 2995bf
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 2995bf
Content-Transfer-Encoding: 8bit
Karsten Hopp 2995bf
------------
Karsten Hopp 2995bf
Karsten Hopp 2995bf
Patch 7.2.085
Karsten Hopp 2995bf
Problem:    ":set <M-b>=<Esc>b" does not work when 'encoding' is utf-8.
Karsten Hopp 2995bf
Solution:   Put the <M-b> character in the input buffer as valid utf-8.
Karsten Hopp 2995bf
	    (partly by Matt Wosniski)
Karsten Hopp 2995bf
Files:	    src/term.c
Karsten Hopp 2995bf
Karsten Hopp 2995bf
Karsten Hopp 2995bf
*** ../vim-7.2.084/src/term.c	Tue Jul 29 12:22:12 2008
Karsten Hopp 2995bf
--- src/term.c	Thu Jan 22 18:18:29 2009
Karsten Hopp 2995bf
***************
Karsten Hopp 2995bf
*** 4920,4926 ****
Karsten Hopp 2995bf
  	key_name[0] = KEY2TERMCAP0(key);
Karsten Hopp 2995bf
  	key_name[1] = KEY2TERMCAP1(key);
Karsten Hopp 2995bf
  	if (key_name[0] == KS_KEY)
Karsten Hopp 2995bf
! 	    string[new_slen++] = key_name[1];	/* from ":set <M-b>=xx" */
Karsten Hopp 2995bf
  	else
Karsten Hopp 2995bf
  	{
Karsten Hopp 2995bf
  	    string[new_slen++] = K_SPECIAL;
Karsten Hopp 2995bf
--- 4920,4934 ----
Karsten Hopp 2995bf
  	key_name[0] = KEY2TERMCAP0(key);
Karsten Hopp 2995bf
  	key_name[1] = KEY2TERMCAP1(key);
Karsten Hopp 2995bf
  	if (key_name[0] == KS_KEY)
Karsten Hopp 2995bf
! 	{
Karsten Hopp 2995bf
! 	    /* from ":set <M-b>=xx" */
Karsten Hopp 2995bf
! #ifdef FEAT_MBYTE
Karsten Hopp 2995bf
! 	    if (has_mbyte)
Karsten Hopp 2995bf
! 		new_slen += (*mb_char2bytes)(key_name[1], string + new_slen);
Karsten Hopp 2995bf
! 	    else
Karsten Hopp 2995bf
! #endif
Karsten Hopp 2995bf
! 		string[new_slen++] = key_name[1];
Karsten Hopp 2995bf
! 	}
Karsten Hopp 2995bf
  	else
Karsten Hopp 2995bf
  	{
Karsten Hopp 2995bf
  	    string[new_slen++] = K_SPECIAL;
Karsten Hopp 2995bf
*** ../vim-7.2.084/src/version.c	Tue Jan 13 18:10:21 2009
Karsten Hopp 2995bf
--- src/version.c	Thu Jan 22 18:31:50 2009
Karsten Hopp 2995bf
***************
Karsten Hopp 2995bf
*** 678,679 ****
Karsten Hopp 2995bf
--- 678,681 ----
Karsten Hopp 2995bf
  {   /* Add new patch number below this line */
Karsten Hopp 2995bf
+ /**/
Karsten Hopp 2995bf
+     85,
Karsten Hopp 2995bf
  /**/
Karsten Hopp 2995bf
Karsten Hopp 2995bf
-- 
Karsten Hopp 2995bf
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 2995bf
20. When looking at a pageful of someone else's links, you notice all of them
Karsten Hopp 2995bf
    are already highlighted in purple.
Karsten Hopp 2995bf
Karsten Hopp 2995bf
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 2995bf
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 2995bf
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 2995bf
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///