To: vim-dev@vim.org Subject: Patch 6.0.104 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.104 Problem: Multi-byte: When '$' is in 'cpoptions', typing a double-wide character that overwrites the left halve of an old double-wide character causes a redraw problem and the cursor stops blinking. Solution: Clear the right half of the old character. (Yasuhiro Matsumoto) Files: src/edit.c, src/screen.c *** ../vim60.103/src/edit.c Thu Dec 13 19:15:02 2001 --- src/edit.c Sun Dec 30 21:00:46 2001 *************** *** 329,334 **** --- 329,340 ---- else State = INSERT; + /* + * Need to recompute the cursor position, it might move when the cursor is + * on a TAB or special character. + */ + curs_columns(TRUE); + if (curbuf->b_p_iminsert == B_IMODE_LMAP) State |= LANGMAP; #ifdef USE_IM_CONTROL *************** *** 338,349 **** #if defined(FEAT_MBYTE) && defined(MACOS) KeyScript(previous_script); #endif - - /* - * Need to recompute the cursor position, it might move when the cursor is - * on a TAB or special character. - */ - curs_columns(TRUE); #ifdef FEAT_MOUSE setmouse(); --- 344,349 ---- *** ../vim60.103/src/screen.c Sun Nov 4 19:10:16 2001 --- src/screen.c Sun Dec 30 21:16:39 2001 *************** *** 4062,4070 **** } /* When writing a single-width character over a double-width * character and at the end of the redrawn text, need to clear out ! * the right halve of the old character. */ ! if (has_mbyte && char_cells == 1 && col + 1 == endcol ! && (*mb_off2cells)(off_to) > 1) clear_next = TRUE; #endif --- 4062,4076 ---- } /* When writing a single-width character over a double-width * character and at the end of the redrawn text, need to clear out ! * the right halve of the old character. ! * Also required when writing the right halve of a double-width ! * char over the left halve of an existing one. */ ! if (has_mbyte && col + char_cells == endcol ! && ((char_cells == 1 ! && (*mb_off2cells)(off_to) > 1) ! || (char_cells == 2 ! && (*mb_off2cells)(off_to) == 1 ! && (*mb_off2cells)(off_to + 1) > 1))) clear_next = TRUE; #endif *************** *** 4355,4361 **** } /* ! * Get the lenght of an item as it will be shown in that status line. */ static int status_match_len(xp, s) --- 4361,4367 ---- } /* ! * Get the lenght of an item as it will be shown in the status line. */ static int status_match_len(xp, s) *************** *** 5106,5114 **** #ifdef FEAT_MBYTE /* When at the end of the text and overwriting a two-cell * character with a one-cell character, need to clear the next ! * cell. */ ! if (has_mbyte && mbyte_cells == 1 && ptr[mbyte_blen] == NUL ! && (*mb_off2cells)(off) > 1) clear_next_cell = TRUE; #endif ScreenLines[off] = *ptr; --- 5112,5124 ---- #ifdef FEAT_MBYTE /* When at the end of the text and overwriting a two-cell * character with a one-cell character, need to clear the next ! * cell. Also when overwriting the left halve of a two-cell ! * char with the right halve of a two-cell char. */ ! if (has_mbyte && ptr[mbyte_blen] == NUL ! && ((mbyte_cells == 1 && (*mb_off2cells)(off) > 1) ! || (mbyte_cells == 2 ! && (*mb_off2cells)(off) == 1 ! && (*mb_off2cells)(off + 1) > 1))) clear_next_cell = TRUE; #endif ScreenLines[off] = *ptr; *** ../vim60.103/src/version.c Sun Dec 30 17:47:16 2001 --- src/version.c Sun Dec 30 21:19:40 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 104, /**/ -- GALAHAD: Camelot ... LAUNCELOT: Camelot ... GAWAIN: It's only a model. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///