From cabcc615c1b22101ce30121fcedee457a61559da Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 14 Jul 2020 10:47:17 +0200 Subject: vt: change HT (horizontal tab) to *not* clear LCF According to the specification, HT **should** clear LCF. However, nearly all emulators do not. In particular, XTerm doesn't. So we follow suite. --- vt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vt.c') diff --git a/vt.c b/vt.c index 1254d28b..8d9d6cfa 100644 --- a/vt.c +++ b/vt.c @@ -142,7 +142,13 @@ action_execute(struct terminal *term, uint8_t c) } } assert(new_col >= term->grid->cursor.point.col); + + /* According to the specification, HT _should_ cancel LCF. But + * XTerm, and nearly all other emulators, don't. So we follow + * suite */ + bool lcf = term->grid->cursor.lcf; term_cursor_right(term, new_col - term->grid->cursor.point.col); + term->grid->cursor.lcf = lcf; break; } -- cgit v1.3