diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-05-16 18:06:42 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-05-16 21:06:13 +0200 |
commit | 475a0a36cb4fda1da30f014da65988e99b222876 (patch) | |
tree | 4e39ee0b9f245f4ef16d8b1b0064900d8a2313b2 /st.c | |
parent | e8392b282c2eaa28725241a9612804fb55113da4 (diff) | |
download | st-475a0a36cb4fda1da30f014da65988e99b222876.tar.gz st-475a0a36cb4fda1da30f014da65988e99b222876.tar.bz2 st-475a0a36cb4fda1da30f014da65988e99b222876.zip |
Revert "support REP (repeat) escape sequence"
This reverts commit e8392b282c2eaa28725241a9612804fb55113da4.
There is currently a bug in older ncurses versions (like on OpenBSD) where a
fix for a bug with REP is not backported yet. Most likely in tty/tty_update.c:
Noticed while using lynx (which uses ncurses/curses).
To reproduce using lynx: echo "Z0000000" | lynx -stdin
or using the program:
int
main(void)
{
WINDOW *win;
win = initscr();
printw("Z0000000");
refresh();
sleep(5);
return 0;
}
This prints "ZZZZZZZ" (incorrectly).
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -129,7 +129,6 @@ typedef struct { int charset; /* current charset */ int icharset; /* selected charset for sequence */ int *tabs; - Rune lastc; /* last printed char outside of sequence, 0 if control */ } Term; /* CSI Escape sequence structs */ @@ -1649,12 +1648,6 @@ csihandle(void) if (csiescseq.arg[0] == 0) ttywrite(vtiden, strlen(vtiden), 0); break; - case 'b': /* REP -- if last char is printable print it <n> more times */ - DEFAULT(csiescseq.arg[0], 1); - if (term.lastc) - while (csiescseq.arg[0]-- > 0) - tputc(term.lastc); - break; case 'C': /* CUF -- Cursor <n> Forward */ case 'a': /* HPR -- Cursor <n> Forward */ DEFAULT(csiescseq.arg[0], 1); @@ -2380,8 +2373,6 @@ check_control_code: /* * control codes are not shown ever */ - if (!term.esc) - term.lastc = 0; return; } else if (term.esc & ESC_START) { if (term.esc & ESC_CSI) { @@ -2431,7 +2422,6 @@ check_control_code: } tsetchar(u, &term.c.attr, term.c.x, term.c.y); - term.lastc = u; if (width == 2) { gp->mode |= ATTR_WIDE; |