|
Karsten Hopp |
14967e |
To: vim-dev@vim.org
|
|
Karsten Hopp |
14967e |
Subject: Patch 7.2.354
|
|
Karsten Hopp |
14967e |
Fcc: outbox
|
|
Karsten Hopp |
14967e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
14967e |
Mime-Version: 1.0
|
|
Karsten Hopp |
14967e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
14967e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
14967e |
------------
|
|
Karsten Hopp |
14967e |
|
|
Karsten Hopp |
14967e |
Patch 7.2.354
|
|
Karsten Hopp |
14967e |
Problem: Japanese single-width double-byte characters not handled correctly.
|
|
Karsten Hopp |
14967e |
Solution: Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[].
|
|
Karsten Hopp |
14967e |
(partly by Kikuchan)
|
|
Karsten Hopp |
14967e |
Files: src/screen.c
|
|
Karsten Hopp |
14967e |
|
|
Karsten Hopp |
14967e |
|
|
Karsten Hopp |
14967e |
*** ../vim-7.2.353/src/screen.c 2010-01-19 17:40:39.000000000 +0100
|
|
Karsten Hopp |
14967e |
--- src/screen.c 2010-02-03 15:47:19.000000000 +0100
|
|
Karsten Hopp |
14967e |
***************
|
|
Karsten Hopp |
14967e |
*** 2335,2347 ****
|
|
Karsten Hopp |
14967e |
if (cells > 1)
|
|
Karsten Hopp |
14967e |
ScreenLines[idx + 1] = 0;
|
|
Karsten Hopp |
14967e |
}
|
|
Karsten Hopp |
14967e |
! else if (cells > 1) /* double-byte character */
|
|
Karsten Hopp |
14967e |
! {
|
|
Karsten Hopp |
14967e |
! if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
|
|
Karsten Hopp |
14967e |
! ScreenLines2[idx] = p[1];
|
|
Karsten Hopp |
14967e |
! else
|
|
Karsten Hopp |
14967e |
! ScreenLines[idx + 1] = p[1];
|
|
Karsten Hopp |
14967e |
! }
|
|
Karsten Hopp |
14967e |
col += cells;
|
|
Karsten Hopp |
14967e |
idx += cells;
|
|
Karsten Hopp |
14967e |
p += c_len;
|
|
Karsten Hopp |
14967e |
--- 2335,2346 ----
|
|
Karsten Hopp |
14967e |
if (cells > 1)
|
|
Karsten Hopp |
14967e |
ScreenLines[idx + 1] = 0;
|
|
Karsten Hopp |
14967e |
}
|
|
Karsten Hopp |
14967e |
! else if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
|
|
Karsten Hopp |
14967e |
! /* double-byte single width character */
|
|
Karsten Hopp |
14967e |
! ScreenLines2[idx] = p[1];
|
|
Karsten Hopp |
14967e |
! else if (cells > 1)
|
|
Karsten Hopp |
14967e |
! /* double-width character */
|
|
Karsten Hopp |
14967e |
! ScreenLines[idx + 1] = p[1];
|
|
Karsten Hopp |
14967e |
col += cells;
|
|
Karsten Hopp |
14967e |
idx += cells;
|
|
Karsten Hopp |
14967e |
p += c_len;
|
|
Karsten Hopp |
14967e |
***************
|
|
Karsten Hopp |
14967e |
*** 4631,4637 ****
|
|
Karsten Hopp |
14967e |
--- 4630,4640 ----
|
|
Karsten Hopp |
14967e |
ScreenLines[off] = c;
|
|
Karsten Hopp |
14967e |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
14967e |
if (enc_dbcs == DBCS_JPNU)
|
|
Karsten Hopp |
14967e |
+ {
|
|
Karsten Hopp |
14967e |
+ if ((mb_c & 0xff00) == 0x8e00)
|
|
Karsten Hopp |
14967e |
+ ScreenLines[off] = 0x8e;
|
|
Karsten Hopp |
14967e |
ScreenLines2[off] = mb_c & 0xff;
|
|
Karsten Hopp |
14967e |
+ }
|
|
Karsten Hopp |
14967e |
else if (enc_utf8)
|
|
Karsten Hopp |
14967e |
{
|
|
Karsten Hopp |
14967e |
if (mb_utf8)
|
|
Karsten Hopp |
14967e |
*** ../vim-7.2.353/src/version.c 2010-02-03 15:14:15.000000000 +0100
|
|
Karsten Hopp |
14967e |
--- src/version.c 2010-02-03 15:43:43.000000000 +0100
|
|
Karsten Hopp |
14967e |
***************
|
|
Karsten Hopp |
14967e |
*** 683,684 ****
|
|
Karsten Hopp |
14967e |
--- 683,686 ----
|
|
Karsten Hopp |
14967e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
14967e |
+ /**/
|
|
Karsten Hopp |
14967e |
+ 354,
|
|
Karsten Hopp |
14967e |
/**/
|
|
Karsten Hopp |
14967e |
|
|
Karsten Hopp |
14967e |
--
|
|
Karsten Hopp |
14967e |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
14967e |
189. You put your e-mail address in the upper left-hand corner of envelopes.
|
|
Karsten Hopp |
14967e |
|
|
Karsten Hopp |
14967e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
14967e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
14967e |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
14967e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|