* Undoing the replacement of a multicolumn character by a singlecolumn

character twice made the singlecolumn character invisible.
This commit is contained in:
Gunnar Ritter 2005-01-10 21:59:00 +00:00
parent 5a5e906d9e
commit 335f1e9f08
4 changed files with 17 additions and 7 deletions

View File

@ -4,6 +4,8 @@ Release ...
other than xterm. other than xterm.
* When a multicolumn character was inserted and then replaced, the visual * When a multicolumn character was inserted and then replaced, the visual
screen representation was sometimes not updated accordingly. 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 * The '\u', '\l', '\U', and '\L' substitution sequences work with multibyte
characters now. characters now.
* Handle character case conversions with the '~' vi command correctly if the * Handle character case conversions with the '~' vi command correctly if the

View File

@ -72,7 +72,7 @@
* *
* from ex_vis.h 7.4 (Berkeley) 5/31/85 * 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
*/ */
/* /*

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #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
#endif #endif

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #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
#endif #endif
@ -588,6 +588,7 @@ vinschar(int c)
bool OXN; bool OXN;
if ((!IM || !EI) && ((hold & HOLDQIK) || !value(REDRAW) || value(SLOWOPEN))) { if ((!IM || !EI) && ((hold & HOLDQIK) || !value(REDRAW) || value(SLOWOPEN))) {
int (*OO)() = Outchar;
/* /*
* Don't want to try to use terminal * Don't want to try to use terminal
* insert mode, or to try to fake it. * insert mode, or to try to fake it.
@ -598,7 +599,13 @@ vinschar(int c)
vgotab(); vgotab();
return c; return c;
} }
/*
* This indicates to vputchar() that it has to set MULTICOL
* bits but must not call us recursively.
*/
Outchar = NULL;
vputchar(c); vputchar(c);
Outchar = OO;
if (DEPTH(vcline) * WCOLS + !value(REDRAW) > if (DEPTH(vcline) * WCOLS + !value(REDRAW) >
(destline - LINE(vcline)) * WCOLS + destcol) (destline - LINE(vcline)) * WCOLS + destcol)
return c; return c;
@ -684,11 +691,11 @@ vinschar(int c)
int (*OO)() = Outchar; int (*OO)() = Outchar;
endim(); endim();
if (inscol + insmc0 != linend) if (inscol + insmc0 != linend)
doomed -= inssiz + insmc1; doomed -= inssiz + insmc0;
if (insmc1 == 0 && c != '\t' && if (insmc1 == 0 && c != '\t' &&
vtube0[inscol+insmc0] & MULTICOL) vtube0[inscol+insmc0] & MULTICOL)
cellcpy(&vtube0[inscol+insmc0+1], cellcpy(&vtube0[inscol+insmc0],
&vtube0[inscol+insmc0+2]); &vtube0[inscol+insmc0+1]);
/* /*
* This indicates to vputchar() that it has to set MULTICOL * This indicates to vputchar() that it has to set MULTICOL
* bits but must not call us recursively. * bits but must not call us recursively.
@ -1428,7 +1435,8 @@ def:
(*Outchar)(MULTICOL); (*Outchar)(MULTICOL);
} else { } else {
/* /*
* This occurs when replacing characters. * This occurs when replacing characters,
* or in open mode.
*/ */
while (--d) { while (--d) {
*++tp = MULTICOL; *++tp = MULTICOL;