mirror of https://github.com/tildeclub/ex-vi.git
* Various rendering errors happened with multicolumn characters if they
started at an even column (counting from 1 upwards).
This commit is contained in:
parent
b75f03c3ca
commit
a40b8f3ae0
2
Changes
2
Changes
|
@ -2,6 +2,8 @@ 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.
|
||||
* Various rendering errors happened with multicolumn characters if they
|
||||
started at an even column (counting from 1 upwards).
|
||||
* 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
|
||||
|
|
14
ex_put.c
14
ex_put.c
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_put.c 1.26 (gritter) 12/2/04";
|
||||
static char sccsid[] = "@(#)ex_put.c 1.27 (gritter) 1/13/05";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -751,13 +751,17 @@ dontcr:
|
|||
i = ' ';
|
||||
if(i & QUOTE) /* mjm: no sign extension on 3B */
|
||||
i = ' ';
|
||||
if (i != MULTICOL) {
|
||||
if (insmode && ND)
|
||||
if ((insmode || i == MULTICOL) && ND)
|
||||
tputs(ND, 0, plodput);
|
||||
else if (i == MULTICOL) {
|
||||
if (BS && BC)
|
||||
tputs(BC, 0, plodput);
|
||||
else
|
||||
plodput('\b');
|
||||
plodput(vtube[outline][outcol-1]);
|
||||
} else
|
||||
plodput(i);
|
||||
}
|
||||
outcol++;
|
||||
outcol += i == MULTICOL ? 1 : colsc(i);
|
||||
}
|
||||
if (plodcnt < 0)
|
||||
goto out;
|
||||
|
|
|
@ -70,12 +70,12 @@
|
|||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Sccsid @(#)ex_version.c 1.114 (gritter) 1/12/05
|
||||
* Sccsid @(#)ex_version.c 1.115 (gritter) 1/13/05
|
||||
*/
|
||||
|
||||
#include "ex.h"
|
||||
|
||||
static char *versionstring = "@(#)Version 4.0 (gritter) 1/12/05";
|
||||
static char *versionstring = "@(#)Version 4.0 (gritter) 1/13/05";
|
||||
|
||||
void
|
||||
printver(void)
|
||||
|
|
38
ex_vput.c
38
ex_vput.c
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_vput.c 1.40 (gritter) 1/11/05";
|
||||
static char sccsid[] = "@(#)ex_vput.c 1.41 (gritter) 1/13/05";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -373,7 +373,7 @@ vgoto(register int y, register int x)
|
|||
x %= WCOLS;
|
||||
}
|
||||
#ifdef MB
|
||||
else if (y >= 0 && mb_cur_max > 1 && !insmode) {
|
||||
if (y >= 0 && mb_cur_max > 1 && !insmode) {
|
||||
while (x > 0 && (vtube[y][x]&(MULTICOL|TRIM)) == MULTICOL)
|
||||
x--;
|
||||
}
|
||||
|
@ -589,7 +589,6 @@ vinschar(int c)
|
|||
|
||||
insmc1 = colsc(c) - 1;
|
||||
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.
|
||||
|
@ -600,13 +599,7 @@ 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 (insmc1 == 0 && (vtube0[destcol]&(TRIM|MULTICOL))==MULTICOL)
|
||||
vtube0[destcol] = INVBIT;
|
||||
if (DEPTH(vcline) * WCOLS + !value(REDRAW) >
|
||||
|
@ -690,22 +683,15 @@ vinschar(int c)
|
|||
* rather we can just typeover.
|
||||
*/
|
||||
if (inssiz + insmc1 <= doomed) {
|
||||
int (*OO)() = Outchar;
|
||||
endim();
|
||||
if (inscol + insmc0 != linend)
|
||||
doomed -= inssiz + insmc1;
|
||||
if (insmc1 == 0 && c != '\t' &&
|
||||
vtube0[inscol+insmc0] & MULTICOL)
|
||||
vtube0[inscol+insmc0] = INVBIT;
|
||||
/*
|
||||
* This indicates to vputchar() that it has to set MULTICOL
|
||||
* bits but must not call us recursively.
|
||||
*/
|
||||
Outchar = NULL;
|
||||
do
|
||||
vputchar(c);
|
||||
while (--inssiz);
|
||||
Outchar = OO;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
@ -1062,10 +1048,10 @@ viin(int c)
|
|||
vigotoCL(inscol);
|
||||
remdoom = doomed;
|
||||
for (i = inssiz; i > 0; i--) {
|
||||
if (remdoom > 0) {
|
||||
if (remdoom > insmc1) {
|
||||
remdoom--;
|
||||
endim();
|
||||
} else if (noim)
|
||||
} else if (noim || remdoom == insmc1)
|
||||
endim();
|
||||
else if (IM && EI) {
|
||||
vcsync();
|
||||
|
@ -1074,7 +1060,7 @@ viin(int c)
|
|||
vputchar(c);
|
||||
}
|
||||
|
||||
if (!IM || !EI) {
|
||||
if (!IM || !EI || remdoom == insmc1) {
|
||||
/*
|
||||
* We are a dumb terminal; brute force update
|
||||
* the rest of the line; this is very much an n^^2 process,
|
||||
|
@ -1428,26 +1414,18 @@ def:
|
|||
}
|
||||
}
|
||||
#ifdef MB
|
||||
if (mb_cur_max > 1 && (hold & HOLDPUPD) == 0 &&
|
||||
Outchar != vinschar && (d = colsc(c&TRIM)) > 1) {
|
||||
if (mb_cur_max > 1 && (d = colsc(c&TRIM)) > 1) {
|
||||
if ((*tp&MULTICOL) == 0) {
|
||||
if ((hold & HOLDPUPD) == 0)
|
||||
*tp |= MULTICOL;
|
||||
if (Outchar) {
|
||||
while (--d)
|
||||
(*Outchar)(MULTICOL);
|
||||
} else {
|
||||
/*
|
||||
* This occurs when replacing characters,
|
||||
* or in open mode.
|
||||
*/
|
||||
while (--d) {
|
||||
if ((hold & HOLDPUPD) == 0)
|
||||
*++tp = MULTICOL;
|
||||
destcol++;
|
||||
outcol++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* MB */
|
||||
return c;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue