Karsten Hopp 952cd4
To: vim-dev@vim.org
Karsten Hopp 952cd4
Subject: patch 7.0.178
Karsten Hopp 952cd4
Fcc: outbox
Karsten Hopp 952cd4
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 952cd4
Mime-Version: 1.0
Karsten Hopp 952cd4
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 952cd4
Content-Transfer-Encoding: 8bit
Karsten Hopp 952cd4
------------
Karsten Hopp 952cd4
Karsten Hopp 952cd4
Patch 7.0.178
Karsten Hopp 952cd4
Problem:    When 'enc' is "utf-8" and 'ignorecase' is set the result of ":echo
Karsten Hopp 952cd4
	    ("\xe4" == "\xe4")" varies.
Karsten Hopp 952cd4
Solution:   In mb_strnicmp() avoid looking past NUL bytes.
Karsten Hopp 952cd4
Files:	    src/mbyte.c
Karsten Hopp 952cd4
Karsten Hopp 952cd4
Karsten Hopp 952cd4
*** ../vim-7.0.177/src/mbyte.c	Wed Nov  1 18:10:36 2006
Karsten Hopp 952cd4
--- src/mbyte.c	Tue Dec  5 22:04:34 2006
Karsten Hopp 952cd4
***************
Karsten Hopp 952cd4
*** 2294,2301 ****
Karsten Hopp 952cd4
--- 2294,2307 ----
Karsten Hopp 952cd4
  	    }
Karsten Hopp 952cd4
  	    /* Check directly first, it's faster. */
Karsten Hopp 952cd4
  	    for (j = 0; j < l; ++j)
Karsten Hopp 952cd4
+ 	    {
Karsten Hopp 952cd4
  		if (s1[i + j] != s2[i + j])
Karsten Hopp 952cd4
  		    break;
Karsten Hopp 952cd4
+ 		if (s1[i + j] == 0)
Karsten Hopp 952cd4
+ 		    /* Both stings have the same bytes but are incomplete or
Karsten Hopp 952cd4
+ 		     * have illegal bytes, accept them as equal. */
Karsten Hopp 952cd4
+ 		    l = j;
Karsten Hopp 952cd4
+ 	    }
Karsten Hopp 952cd4
  	    if (j < l)
Karsten Hopp 952cd4
  	    {
Karsten Hopp 952cd4
  		/* If one of the two characters is incomplete return -1. */
Karsten Hopp 952cd4
*** ../vim-7.0.177/src/version.c	Tue Dec  5 21:45:20 2006
Karsten Hopp 952cd4
--- src/version.c	Tue Dec  5 22:08:08 2006
Karsten Hopp 952cd4
***************
Karsten Hopp 952cd4
*** 668,669 ****
Karsten Hopp 952cd4
--- 668,671 ----
Karsten Hopp 952cd4
  {   /* Add new patch number below this line */
Karsten Hopp 952cd4
+ /**/
Karsten Hopp 952cd4
+     178,
Karsten Hopp 952cd4
  /**/
Karsten Hopp 952cd4
Karsten Hopp 952cd4
-- 
Karsten Hopp 952cd4
Trees moving back and forth is what makes the wind blow.
Karsten Hopp 952cd4
Karsten Hopp 952cd4
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 952cd4
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 952cd4
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 952cd4
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///