aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-14 08:49:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-14 08:49:44 +0000
commit01c3a2635dd015910d102c4fa7fff68f1dbb1d7a (patch)
treedb5248a4670248827063f997d601158ff219f448
parentvt: change HT (horizontal tab) to *not* clear LCF (diff)
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
-rw-r--r--CHANGELOG.md6
-rw-r--r--terminal.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d18d1f3..904730d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -96,8 +96,10 @@
(https://codeberg.org/dnkl/foot/issues/35).
* `C0::VT` to be processed as `C0::LF`. Previously, `C0::VT` would
only move the cursor down, but never scroll.
-* HT (_Horizontal Tab_, or `\t`) no longer clears `LCF` (_Last Column
- Flag_).
+* `HT` (_Horizontal Tab_, or `\t`) no longer clears `LCF` (_Last
+ 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
diff --git a/terminal.c b/terminal.c
index e02255bc..4ed34f63 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1887,6 +1887,8 @@ void
term_linefeed(struct terminal *term)
{
term->grid->cur_row->linebreak = true;
+ term->grid->cursor.lcf = false;
+
if (term->grid->cursor.point.row == term->scroll_region.end - 1)
term_scroll(term, 1);
else