2102f06
To: vim-dev@vim.org
2102f06
Subject: Patch 7.2.267
2102f06
Fcc: outbox
2102f06
From: Bram Moolenaar <Bram@moolenaar.net>
2102f06
Mime-Version: 1.0
2102f06
Content-Type: text/plain; charset=UTF-8
2102f06
Content-Transfer-Encoding: 8bit
2102f06
------------
2102f06
2102f06
Patch 7.2.267
2102f06
Problem:    Crash for narrow window and double-width character.
2102f06
Solution:   Check for zero width.  (Taro Muraoka)
2102f06
Files:	    src/charset.c
2102f06
2102f06
2102f06
*** ../vim-7.2.266/src/charset.c	2009-09-11 14:02:25.000000000 +0200
2102f06
--- src/charset.c	2009-10-07 16:17:27.000000000 +0200
2102f06
***************
2102f06
*** 1218,1223 ****
2102f06
--- 1218,1225 ----
2102f06
      if ((int)vcol == width1 - 1)
2102f06
  	return TRUE;
2102f06
      width2 = width1 + win_col_off2(wp);
2102f06
+     if (width2 <= 0)
2102f06
+ 	return FALSE;
2102f06
      return ((vcol - width1) % width2 == width2 - 1);
2102f06
  }
2102f06
  #endif /* FEAT_MBYTE */
2102f06
*** ../vim-7.2.266/src/version.c	2009-09-30 15:15:33.000000000 +0200
2102f06
--- src/version.c	2009-10-07 16:19:05.000000000 +0200
2102f06
***************
2102f06
*** 678,679 ****
2102f06
--- 678,681 ----
2102f06
  {   /* Add new patch number below this line */
2102f06
+ /**/
2102f06
+     267,
2102f06
  /**/
2102f06
2102f06
-- 
2102f06
You got to work at a mill?  Lucky!  I got sent back to work in the
2102f06
acid-mines for my daily crust of stale bread... which not even the
2102f06
birds would eat.
2102f06
2102f06
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
2102f06
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
2102f06
\\\        download, build and distribute -- http://www.A-A-P.org        ///
2102f06
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///