Karsten Hopp 688fa6
To: vim-dev@vim.org
Karsten Hopp 688fa6
Subject: patch 7.1.116
Karsten Hopp 688fa6
Fcc: outbox
Karsten Hopp 688fa6
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 688fa6
Mime-Version: 1.0
Karsten Hopp 688fa6
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 688fa6
Content-Transfer-Encoding: 8bit
Karsten Hopp 688fa6
------------
Karsten Hopp 688fa6
Karsten Hopp 688fa6
Patch 7.1.116
Karsten Hopp 688fa6
Problem:    Cannot display Unicode characters above 0x10000.
Karsten Hopp 688fa6
Solution:   Remove the replacement with a question mark when UNICODE16 is not
Karsten Hopp 688fa6
	    defined. (partly by Nicolas Weber)
Karsten Hopp 688fa6
Files:	    src/screen.c
Karsten Hopp 688fa6
Karsten Hopp 688fa6
Karsten Hopp 688fa6
*** ../vim-7.1.115/src/screen.c	Thu Aug 30 13:51:52 2007
Karsten Hopp 688fa6
--- src/screen.c	Mon Sep 10 22:29:42 2007
Karsten Hopp 688fa6
***************
Karsten Hopp 688fa6
*** 2305,2313 ****
Karsten Hopp 688fa6
--- 2305,2315 ----
Karsten Hopp 688fa6
  			prev_c = u8c;
Karsten Hopp 688fa6
  #endif
Karsten Hopp 688fa6
  		    /* Non-BMP character: display as ? or fullwidth ?. */
Karsten Hopp 688fa6
+ #ifdef UNICODE16
Karsten Hopp 688fa6
  		    if (u8c >= 0x10000)
Karsten Hopp 688fa6
  			ScreenLinesUC[idx] = (cells == 2) ? 0xff1f : (int)'?';
Karsten Hopp 688fa6
  		    else
Karsten Hopp 688fa6
+ #endif
Karsten Hopp 688fa6
  			ScreenLinesUC[idx] = u8c;
Karsten Hopp 688fa6
  		    for (i = 0; i < Screen_mco; ++i)
Karsten Hopp 688fa6
  		    {
Karsten Hopp 688fa6
***************
Karsten Hopp 688fa6
*** 3678,3690 ****
Karsten Hopp 688fa6
  		    if ((mb_l == 1 && c >= 0x80)
Karsten Hopp 688fa6
  			    || (mb_l >= 1 && mb_c == 0)
Karsten Hopp 688fa6
  			    || (mb_l > 1 && (!vim_isprintc(mb_c)
Karsten Hopp 688fa6
! 							 || mb_c >= 0x10000)))
Karsten Hopp 688fa6
  		    {
Karsten Hopp 688fa6
  			/*
Karsten Hopp 688fa6
  			 * Illegal UTF-8 byte: display as <xx>.
Karsten Hopp 688fa6
  			 * Non-BMP character : display as ? or fullwidth ?.
Karsten Hopp 688fa6
  			 */
Karsten Hopp 688fa6
  			if (mb_c < 0x10000)
Karsten Hopp 688fa6
  			{
Karsten Hopp 688fa6
  			    transchar_hex(extra, mb_c);
Karsten Hopp 688fa6
  # ifdef FEAT_RIGHTLEFT
Karsten Hopp 688fa6
--- 3680,3697 ----
Karsten Hopp 688fa6
  		    if ((mb_l == 1 && c >= 0x80)
Karsten Hopp 688fa6
  			    || (mb_l >= 1 && mb_c == 0)
Karsten Hopp 688fa6
  			    || (mb_l > 1 && (!vim_isprintc(mb_c)
Karsten Hopp 688fa6
! # ifdef UNICODE16
Karsten Hopp 688fa6
! 							 || mb_c >= 0x10000
Karsten Hopp 688fa6
! # endif
Karsten Hopp 688fa6
! 							 )))
Karsten Hopp 688fa6
  		    {
Karsten Hopp 688fa6
  			/*
Karsten Hopp 688fa6
  			 * Illegal UTF-8 byte: display as <xx>.
Karsten Hopp 688fa6
  			 * Non-BMP character : display as ? or fullwidth ?.
Karsten Hopp 688fa6
  			 */
Karsten Hopp 688fa6
+ # ifdef UNICODE16
Karsten Hopp 688fa6
  			if (mb_c < 0x10000)
Karsten Hopp 688fa6
+ # endif
Karsten Hopp 688fa6
  			{
Karsten Hopp 688fa6
  			    transchar_hex(extra, mb_c);
Karsten Hopp 688fa6
  # ifdef FEAT_RIGHTLEFT
Karsten Hopp 688fa6
***************
Karsten Hopp 688fa6
*** 3692,3702 ****
Karsten Hopp 688fa6
--- 3699,3711 ----
Karsten Hopp 688fa6
  				rl_mirror(extra);
Karsten Hopp 688fa6
  # endif
Karsten Hopp 688fa6
  			}
Karsten Hopp 688fa6
+ # ifdef UNICODE16
Karsten Hopp 688fa6
  			else if (utf_char2cells(mb_c) != 2)
Karsten Hopp 688fa6
  			    STRCPY(extra, "?");
Karsten Hopp 688fa6
  			else
Karsten Hopp 688fa6
  			    /* 0xff1f in UTF-8: full-width '?' */
Karsten Hopp 688fa6
  			    STRCPY(extra, "\357\274\237");
Karsten Hopp 688fa6
+ # endif
Karsten Hopp 688fa6
  
Karsten Hopp 688fa6
  			p_extra = extra;
Karsten Hopp 688fa6
  			c = *p_extra;
Karsten Hopp 688fa6
***************
Karsten Hopp 688fa6
*** 6245,6250 ****
Karsten Hopp 688fa6
--- 6254,6260 ----
Karsten Hopp 688fa6
  		else
Karsten Hopp 688fa6
  		    u8c = utfc_ptr2char(ptr, u8cc);
Karsten Hopp 688fa6
  		mbyte_cells = utf_char2cells(u8c);
Karsten Hopp 688fa6
+ # ifdef UNICODE16
Karsten Hopp 688fa6
  		/* Non-BMP character: display as ? or fullwidth ?. */
Karsten Hopp 688fa6
  		if (u8c >= 0x10000)
Karsten Hopp 688fa6
  		{
Karsten Hopp 688fa6
***************
Karsten Hopp 688fa6
*** 6252,6257 ****
Karsten Hopp 688fa6
--- 6262,6268 ----
Karsten Hopp 688fa6
  		    if (attr == 0)
Karsten Hopp 688fa6
  			attr = hl_attr(HLF_8);
Karsten Hopp 688fa6
  		}
Karsten Hopp 688fa6
+ # endif
Karsten Hopp 688fa6
  # ifdef FEAT_ARABIC
Karsten Hopp 688fa6
  		if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c))
Karsten Hopp 688fa6
  		{
Karsten Hopp 688fa6
*** ../vim-7.1.116/src/version.c	Mon Sep 17 22:19:43 2007
Karsten Hopp 688fa6
--- src/version.c	Mon Sep 17 22:37:31 2007
Karsten Hopp 688fa6
***************
Karsten Hopp 688fa6
*** 668,669 ****
Karsten Hopp 688fa6
--- 668,671 ----
Karsten Hopp 688fa6
  {   /* Add new patch number below this line */
Karsten Hopp 688fa6
+ /**/
Karsten Hopp 688fa6
+     116,
Karsten Hopp 688fa6
  /**/
Karsten Hopp 688fa6
Karsten Hopp 688fa6
-- 
Karsten Hopp 688fa6
There can't be a crisis today, my schedule is already full.
Karsten Hopp 688fa6
Karsten Hopp 688fa6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 688fa6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 688fa6
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 688fa6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///