To: vim-dev@vim.org Subject: Patch 6.3.044 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3.044 (extra) Problem: Mac: When 'linespace' is non-zero the Insert mode cursor leaves pixels behind. (Richard Sandilands) Solution: Erase the character cell before drawing the text when needed. Files: src/gui_mac.c *** ../vim-6.3.043/src/gui_mac.c Wed Jun 9 14:56:27 2004 --- src/gui_mac.c Wed Dec 8 21:48:12 2004 *************** *** 3560,3565 **** --- 3560,3586 ---- (void)SwapQDTextFlags(qd_flags); } + /* + * When antialiasing we're using srcOr mode, we have to clear the block + * before drawing the text. + * Also needed when 'linespace' is non-zero to remove the cursor and + * underlining. + * But not when drawing transparently. + * The following is like calling gui_mch_clear_block(row, col, row, col + + * len - 1), but without setting the bg color to gui.back_pixel. + */ + if (((sys_version >= 0x1020 && p_antialias) || p_linespace != 0) + && !(flags & DRAW_TRANSP)) + { + Rect rc; + + rc.left = FILL_X(col); + rc.top = FILL_Y(row); + rc.right = FILL_X(col + len) + (col + len == Columns); + rc.bottom = FILL_Y(row + 1); + EraseRect(&rc); + } + if (sys_version >= 0x1020 && p_antialias) { StyleParameter face; *************** *** 3573,3594 **** /* Quartz antialiasing works only in srcOr transfer mode. */ TextMode(srcOr); - - if (!(flags & DRAW_TRANSP)) - { - /* - * Since we're using srcOr mode, we have to clear the block - * before drawing the text. The following is like calling - * gui_mch_clear_block(row, col, row, col + len - 1), - * but without setting the bg color to gui.back_pixel. - */ - Rect rc; - rc.left = FILL_X(col); - rc.top = FILL_Y(row); - rc.right = FILL_X(col + len) + (col + len == Columns); - rc.bottom = FILL_Y(row + 1); - EraseRect(&rc); - } MoveTo(TEXT_X(col), TEXT_Y(row)); DrawText((char*)s, 0, len); --- 3594,3599 ---- *** ../vim-6.3.043/src/version.c Tue Dec 7 13:12:08 2004 --- src/version.c Wed Dec 8 21:50:21 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 44, /**/ -- hundred-and-one symptoms of being an internet addict: 27. You refer to your age as 3.x. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///