To: vim-dev@vim.org Subject: Patch 6.1.334 (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.334 (extra, depends on 6.1.303) Problem: Problem with drawing Hebrew characters. Solution: Only use ETO_PDY for Windows NT and the like. (Yasuhiro Matsumoto) Files: src/gui_w32.c *** ../vim61.333/src/gui_w32.c Tue Jan 28 21:22:04 2003 --- src/gui_w32.c Sun Feb 9 19:39:39 2003 *************** *** 1741,1752 **** vim_free(unicodebuf); unicodebuf = (WCHAR *)alloc(len * sizeof(WCHAR)); ! vim_free(unicodepdy); ! unicodepdy = (int *)alloc(len * sizeof(int) * 2); ! if (unicodepdy == NULL) { ! vim_free(unicodebuf); ! unicodebuf = NULL; } unibuflen = len; --- 1741,1750 ---- vim_free(unicodebuf); unicodebuf = (WCHAR *)alloc(len * sizeof(WCHAR)); ! if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT) { ! vim_free(unicodepdy); ! unicodepdy = (int *)alloc(len * sizeof(int) * 2); } unibuflen = len; *************** *** 1764,1776 **** cells = 0; /* Add ETO_PDY to make characters fit as we expect, even when the font * uses different widths (e.g., bold character is wider). */ ! foptions |= ETO_PDY; for (clen = 0; i < len; ) { unicodebuf[clen] = utf_ptr2char(text + i); cw = utf_char2cells(unicodebuf[clen]); ! unicodepdy[clen * 2] = cw * gui.char_width; ! unicodepdy[clen * 2 + 1] = 0; cells += cw; i += utfc_ptr2len_check_len(text + i, len - i); ++clen; --- 1762,1780 ---- cells = 0; /* Add ETO_PDY to make characters fit as we expect, even when the font * uses different widths (e.g., bold character is wider). */ ! if (unicodepdy != NULL) ! foptions |= ETO_PDY; for (clen = 0; i < len; ) { unicodebuf[clen] = utf_ptr2char(text + i); cw = utf_char2cells(unicodebuf[clen]); ! if (cw > 2) /* don't use 4 for unprintable char */ ! cw = 1; ! if (unicodepdy != NULL) ! { ! unicodepdy[clen * 2] = cw * gui.char_width; ! unicodepdy[clen * 2 + 1] = 0; ! } cells += cw; i += utfc_ptr2len_check_len(text + i, len - i); ++clen; *** ../vim61.333/src/version.c Sun Feb 16 22:28:48 2003 --- src/version.c Sun Feb 16 22:30:10 2003 *************** *** 608,609 **** --- 612,615 ---- { /* Add new patch number below this line */ + /**/ + 334, /**/ -- This sentence is not sure that it exists, but if it does, it will certainly consider the possibility that other sentences exist. /// 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 /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///