* When a multicolumn character was replaced by another multicolumn character

in insert mode, the display was not updated appropriately with terminals
  other than xterm.
This commit is contained in:
Gunnar Ritter 2005-01-02 01:39:45 +00:00
parent 7a66b78ed7
commit 34bb648726
3 changed files with 25 additions and 4 deletions

View File

@ -1,4 +1,7 @@
Release ... Release ...
* When a multicolumn character was replaced by another multicolumn character
in insert mode, the display was not updated appropriately with terminals
other than xterm.
* Handle character case conversions with the '~' vi command correctly if the * Handle character case conversions with the '~' vi command correctly if the
length of the converted multibyte sequence is smaller than the original one. length of the converted multibyte sequence is smaller than the original one.

View File

@ -70,7 +70,7 @@
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Sccsid @(#)ex_version.c 1.108 (gritter) 1/2/05 * Sccsid @(#)ex_version.c 1.109 (gritter) 1/2/05
*/ */
#include "ex.h" #include "ex.h"

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #ifdef DOSCCS
static char sccsid[] = "@(#)ex_vput.c 1.33 (gritter) 12/2/04"; static char sccsid[] = "@(#)ex_vput.c 1.34 (gritter) 1/2/05";
#endif #endif
#endif #endif
@ -677,6 +677,7 @@ vinschar(int c)
* rather we can just typeover. * rather we can just typeover.
*/ */
if (inssiz + insmc1 <= doomed) { if (inssiz + insmc1 <= doomed) {
int (*OO)() = Outchar;
endim(); endim();
if (inscol + insmc0 != linend) if (inscol + insmc0 != linend)
doomed -= inssiz + insmc1; doomed -= inssiz + insmc1;
@ -684,9 +685,15 @@ vinschar(int c)
vtube0[inscol+insmc0] & MULTICOL) vtube0[inscol+insmc0] & MULTICOL)
cellcpy(&vtube0[inscol+insmc0+1], cellcpy(&vtube0[inscol+insmc0+1],
&vtube0[inscol+insmc0+2]); &vtube0[inscol+insmc0+2]);
/*
* This indicates to vputchar() that it has to set MULTICOL
* bits but must not call us recursively.
*/
Outchar = NULL;
do do
vputchar(c); vputchar(c);
while (--inssiz); while (--inssiz);
Outchar = OO;
return c; return c;
} }
@ -1412,8 +1419,19 @@ def:
Outchar != vinschar && (d = colsc(c&TRIM)) > 1) { Outchar != vinschar && (d = colsc(c&TRIM)) > 1) {
if ((*tp&MULTICOL) == 0) { if ((*tp&MULTICOL) == 0) {
*tp |= MULTICOL; *tp |= MULTICOL;
while (--d) if (Outchar) {
(*Outchar)(MULTICOL); while (--d)
(*Outchar)(MULTICOL);
} else {
/*
* This occurs when replacing characters.
*/
while (--d) {
*++tp = MULTICOL;
destcol++;
outcol++;
}
}
} }
} }
#endif /* MB */ #endif /* MB */