From 4849a16f3719269e0cd9a70d782d542f70bf76bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 14 Jul 2020 09:15:15 +0200 Subject: [PATCH] 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 --- CHANGELOG.md | 2 ++ vt.c | 9 +++------ 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':