diff --git a/Changes b/Changes index a789471..09a30d5 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ Release ... other than xterm. * When a multicolumn character was inserted and then replaced, the visual screen representation was sometimes not updated accordingly. +* Undoing the replacement of a multicolumn character by a singlecolumn + character twice made the singlecolumn character invisible. * The '\u', '\l', '\U', and '\L' substitution sequences work with multibyte characters now. * Handle character case conversions with the '~' vi command correctly if the diff --git a/ex_vis.h b/ex_vis.h index 06f0853..19ebc15 100644 --- a/ex_vis.h +++ b/ex_vis.h @@ -72,7 +72,7 @@ * * from ex_vis.h 7.4 (Berkeley) 5/31/85 * - * @(#)ex_vis.h 1.15 (gritter) 11/27/04 + * @(#)ex_vis.h 1.17 (gritter) 1/10/05 */ /* diff --git a/ex_vops.c b/ex_vops.c index adaf4eb..43ee6d6 100644 --- a/ex_vops.c +++ b/ex_vops.c @@ -73,7 +73,7 @@ #ifndef lint #ifdef DOSCCS -static char sccsid[] = "@(#)ex_vops.c 1.22 (gritter) 1/2/05"; +static char sccsid[] = "@(#)ex_vops.c 1.24 (gritter) 1/10/05"; #endif #endif diff --git a/ex_vput.c b/ex_vput.c index 25a4303..cc1112b 100644 --- a/ex_vput.c +++ b/ex_vput.c @@ -73,7 +73,7 @@ #ifndef lint #ifdef DOSCCS -static char sccsid[] = "@(#)ex_vput.c 1.35 (gritter) 1/10/05"; +static char sccsid[] = "@(#)ex_vput.c 1.38 (gritter) 1/10/05"; #endif #endif @@ -588,6 +588,7 @@ vinschar(int c) bool OXN; if ((!IM || !EI) && ((hold & HOLDQIK) || !value(REDRAW) || value(SLOWOPEN))) { + int (*OO)() = Outchar; /* * Don't want to try to use terminal * insert mode, or to try to fake it. @@ -598,7 +599,13 @@ vinschar(int c) vgotab(); return c; } + /* + * This indicates to vputchar() that it has to set MULTICOL + * bits but must not call us recursively. + */ + Outchar = NULL; vputchar(c); + Outchar = OO; if (DEPTH(vcline) * WCOLS + !value(REDRAW) > (destline - LINE(vcline)) * WCOLS + destcol) return c; @@ -684,11 +691,11 @@ vinschar(int c) int (*OO)() = Outchar; endim(); if (inscol + insmc0 != linend) - doomed -= inssiz + insmc1; + doomed -= inssiz + insmc0; if (insmc1 == 0 && c != '\t' && vtube0[inscol+insmc0] & MULTICOL) - cellcpy(&vtube0[inscol+insmc0+1], - &vtube0[inscol+insmc0+2]); + cellcpy(&vtube0[inscol+insmc0], + &vtube0[inscol+insmc0+1]); /* * This indicates to vputchar() that it has to set MULTICOL * bits but must not call us recursively. @@ -1428,7 +1435,8 @@ def: (*Outchar)(MULTICOL); } else { /* - * This occurs when replacing characters. + * This occurs when replacing characters, + * or in open mode. */ while (--d) { *++tp = MULTICOL;