To: vim-dev@vim.org Subject: Patch 6.1.290 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.290 (extra) Problem: Truncating long text for message box may break multi-byte character. Solution: Adjust to start of multi-byte character. (Yasuhiro Matsumoto) Files: src/os_mswin.c *** ../vim61.289/src/os_mswin.c Sun Oct 13 20:08:14 2002 --- src/os_mswin.c Thu Jan 16 20:37:09 2003 *************** *** 500,506 **** { /* Truncate a very long message, it will go off-screen. */ if (STRLEN(p) > 2000) ! STRCPY(p + 2000 - 14, _("...(truncated)")); #ifdef WIN3264 MessageBox(NULL, p, "Vim", MB_TASKMODAL|MB_SETFOREGROUND); #else --- 500,514 ---- { /* Truncate a very long message, it will go off-screen. */ if (STRLEN(p) > 2000) ! { ! char_u *s = p + 2000 - 14; ! ! #ifdef FEAT_MBYTE ! if (has_mbyte) ! s -= (*mb_head_off)(p, s); ! #endif ! STRCPY(s, _("...(truncated)")); ! } #ifdef WIN3264 MessageBox(NULL, p, "Vim", MB_TASKMODAL|MB_SETFOREGROUND); #else *** ../vim61.289/src/version.c Tue Jan 14 10:38:37 2003 --- src/version.c Thu Jan 16 20:39:39 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 290, /**/ -- It is too bad that the speed of light hasn't kept pace with the changes in CPU speed and network bandwidth. -- /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///