mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
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.
This commit is contained in:
parent
bbce760ab0
commit
cabcc615c1
2 changed files with 8 additions and 0 deletions
|
|
@ -96,6 +96,8 @@
|
||||||
(https://codeberg.org/dnkl/foot/issues/35).
|
(https://codeberg.org/dnkl/foot/issues/35).
|
||||||
* `C0::VT` to be processed as `C0::LF`. Previously, `C0::VT` would
|
* `C0::VT` to be processed as `C0::LF`. Previously, `C0::VT` would
|
||||||
only move the cursor down, but never scroll.
|
only move the cursor down, but never scroll.
|
||||||
|
* HT (_Horizontal Tab_, or `\t`) no longer clears `LCF` (_Last Column
|
||||||
|
Flag_).
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
6
vt.c
6
vt.c
|
|
@ -142,7 +142,13 @@ action_execute(struct terminal *term, uint8_t c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(new_col >= term->grid->cursor.point.col);
|
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_cursor_right(term, new_col - term->grid->cursor.point.col);
|
||||||
|
term->grid->cursor.lcf = lcf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue