terminal: FF (0x0D) also invokes LF

This commit is contained in:
Mitchell Hashimoto
2023-10-06 12:00:18 -07:00
parent 82e845a0dc
commit c2af7b60d0
2 changed files with 3 additions and 7 deletions

View File

@ -21,6 +21,8 @@ pub const C0 = enum(u7) {
LF = 0x0A,
/// Vertical Tab
VT = 0x0B,
/// Form feed
FF = 0x0C,
/// Carriage return
CR = 0x0D,
/// Shift out

View File

@ -115,13 +115,7 @@ pub fn Stream(comptime Handler: type) type {
else
log.warn("unimplemented execute: {x}", .{c}),
.LF => if (@hasDecl(T, "linefeed"))
try self.handler.linefeed()
else
log.warn("unimplemented execute: {x}", .{c}),
// VT is same as LF
.VT => if (@hasDecl(T, "linefeed"))
.LF, .VT, .FF => if (@hasDecl(T, "linefeed"))
try self.handler.linefeed()
else
log.warn("unimplemented execute: {x}", .{c}),