vt: implement ESC H - set tab stop at current column

This commit is contained in:
Daniel Eklöf 2019-11-16 10:57:11 +01:00
parent 13204d9337
commit 9ff48c2015
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

11
vt.c
View file

@ -617,6 +617,17 @@ esc_dispatch(struct terminal *term, uint8_t final)
term_cursor_left(term, term->cursor.col);
break;
case 'H':
tll_foreach(term->tab_stops, it) {
if (it->item >= term->cursor.col) {
tll_insert_before(term->tab_stops, it, term->cursor.col);
break;
}
}
tll_push_back(term->tab_stops, term->cursor.col);
break;
case 'M':
term_reverse_index(term);
break;