mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-20 05:33:47 -04:00
term: linefeed: explicitly clear LCF
LF should always clear LCF. Previously, it was done implicitly in term_cursor_down(). I.e it was cleared as long as the cursor wasn't at the bottom of the scrolling region
This commit is contained in:
parent
cabcc615c1
commit
01c3a2635d
2 changed files with 6 additions and 2 deletions
|
|
@ -96,8 +96,10 @@
|
||||||
(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
|
* `HT` (_Horizontal Tab_, or `\t`) no longer clears `LCF` (_Last
|
||||||
Flag_).
|
Column Flag_).
|
||||||
|
* `LF` now always clears `LCF`. Previously, it only cleared it when
|
||||||
|
the cursor was **not** at the bottom of the scrolling region.
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
|
|
@ -1887,6 +1887,8 @@ void
|
||||||
term_linefeed(struct terminal *term)
|
term_linefeed(struct terminal *term)
|
||||||
{
|
{
|
||||||
term->grid->cur_row->linebreak = true;
|
term->grid->cur_row->linebreak = true;
|
||||||
|
term->grid->cursor.lcf = false;
|
||||||
|
|
||||||
if (term->grid->cursor.point.row == term->scroll_region.end - 1)
|
if (term->grid->cursor.point.row == term->scroll_region.end - 1)
|
||||||
term_scroll(term, 1);
|
term_scroll(term, 1);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue