mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
vt: bug (tab regression): don't get stuck on the same tab stop
There were actually two bugs here: * When checking for a tab stop, make sure the new tab stop is at a different column. Otherwise you can't tab away from a tab stop. * When there aren't any tab stops configured, or when we're already beyond the last tab stop, then tab to the last column (at least I think that's what we're supposed to do).
This commit is contained in:
parent
c9ebd527cf
commit
045f55a8c6
1 changed files with 2 additions and 2 deletions
4
vt.c
4
vt.c
|
|
@ -868,9 +868,9 @@ action(struct terminal *term, enum action _action, uint8_t c)
|
|||
|
||||
case '\x09': {
|
||||
/* HT - horizontal tab */
|
||||
int new_col = term->cursor.point.col;
|
||||
int new_col = term->cols - 1;
|
||||
tll_foreach(term->tab_stops, it) {
|
||||
if (it->item >= term->cursor.point.col) {
|
||||
if (it->item > term->cursor.point.col) {
|
||||
new_col = it->item;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue