To:
[email protected]
Subject: Patch 5.6a.028 (extra)
Fcc: outbox
From: Bram Moolenaar <
[email protected]>
------------
Patch 5.6a.028 (extra)
Problem: Win32 GUI: Dialogs and tear-off menus can't handle multi-byte
characters.
Solution: Adjust nCopyAnsiToWideChar() to handle multi-byte characters
correctly.
Files: src/gui_w32.c
*** ../vim-5.6a.27/src/gui_w32.c Wed Jan 12 21:20:04 2000
--- src/gui_w32.c Fri Jan 14 20:14:43 2000
***************
*** 5014,5019 ****
--- 5014,5032 ----
{
int nChar = 0;
+ #ifdef MULTI_BYTE
+ int len = lstrlen(lpAnsiIn) + 1; /* include NUL character */
+ int i;
+
+ nChar = MultiByteToWideChar(
+ CP_OEMCP,
+ MB_PRECOMPOSED,
+ lpAnsiIn, len,
+ lpWCStr, len);
+ for (i = 0; i < nChar; ++i)
+ if (lpWCStr[i] == (WORD)'\t') /* replace tabs with spaces */
+ lpWCStr[i] = (WORD)' ';
+ #else
do
{
if (*lpAnsiIn == '\t')
***************
*** 5022,5027 ****
--- 5035,5041 ----
*lpWCStr++ = (WORD)*lpAnsiIn;
nChar++;
} while (*lpAnsiIn++);
+ #endif
return nChar;
}
*** ../vim-5.6a.27/src/version.c Fri Jan 14 22:49:13 2000
--- src/version.c Fri Jan 14 22:48:51 2000
***************
*** 420,421 ****
--- 420,423 ----
{ /* Add new patch number below this line */
+ /**/
+ 28,
/**/
--
hundred-and-one symptoms of being an internet addict:
175. You send yourself e-mail before you go to bed to remind you
what to do when you wake up.
--/-/---- Bram Moolenaar ----
[email protected] ----
[email protected] ---\-\--
\ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /