Revert "Fix cursor move with wide glyphs" ref. #118

This reverts commit 400aa4492f.
This commit is contained in:
Bakkeby 2024-03-08 19:52:11 +01:00
parent cd37481bde
commit 3564593563
2 changed files with 3 additions and 7 deletions

6
st.c
View File

@ -2811,16 +2811,12 @@ tstrsequence(uchar c)
void
tcontrolcode(uchar ascii)
{
size_t i;
switch (ascii) {
case '\t': /* HT */
tputtab(1);
return;
case '\b': /* BS */
for (i = 1; term.c.x && term.line[term.c.y][term.c.x - i].u == 0; ++i)
;
tmoveto(term.c.x - i, term.c.y);
tmoveto(term.c.x-1, term.c.y);
return;
case '\r': /* CR */
tmoveto(0, term.c.y);

4
st.h
View File

@ -152,8 +152,8 @@ typedef struct {
typedef struct {
Glyph attr; /* current char attributes */
int x; /* terminal column */
int y; /* terminal row */
int x;
int y;
char state;
} TCursor;