aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-14 07:15:15 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-14 07:15:15 +0000
commit4849a16f3719269e0cd9a70d782d542f70bf76bc (patch)
treea00a62b71e242a4edddd54b9dfc53c5bc2aa8150
parentvt: sort C0's in the switch statement, and use escaped character possible (diff)
vt: process C0::VT the same way we process C0::LF
Previously, C0::VT was implemented as a simple 'cursor down'. I.e. it would behave as LF **until** it reached the bottom of the screen, where instead of scrolling, it became a no-op. See https://vt100.net/docs/vt102-ug/chapter5.html
-rw-r--r--CHANGELOG.md2
-rw-r--r--vt.c9
2 files changed, 5 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 36ae5308..9a26b957 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -93,6 +93,8 @@
* Sixel handling when scrollback wraps around.
* Foot now issues much fewer `wl_surface_damage_buffer()` calls
(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.
### Security
diff --git a/vt.c b/vt.c
index ea2b7135..ade6d3a1 100644
--- a/vt.c
+++ b/vt.c
@@ -147,13 +147,10 @@ action_execute(struct terminal *term, uint8_t c)
}
case '\n':
- /* LF - line feed */
- term_linefeed(term);
- break;
-
case '\v':
- /* VT - vertical tab */
- term_cursor_down(term, 1);
+ /* LF - \n - line feed */
+ /* VT - \v - vertical tab */
+ term_linefeed(term);
break;
case '\r':