mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
implement VT
This commit is contained in:
@ -642,7 +642,6 @@ pub fn setCursorRow(self: *Window, row: u16) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn setCursorPos(self: *Window, row: u16, col: u16) !void {
|
pub fn setCursorPos(self: *Window, row: u16, col: u16) !void {
|
||||||
if (self.terminal.mode_origin) unreachable; // TODO
|
|
||||||
self.terminal.setCursorPos(row, col);
|
self.terminal.setCursorPos(row, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@ pub const C0 = enum(u7) {
|
|||||||
HT = 0x09,
|
HT = 0x09,
|
||||||
/// Line feed
|
/// Line feed
|
||||||
LF = 0x0A,
|
LF = 0x0A,
|
||||||
|
/// Vertical Tab
|
||||||
|
VT = 0x0B,
|
||||||
/// Carriage return
|
/// Carriage return
|
||||||
CR = 0x0D,
|
CR = 0x0D,
|
||||||
};
|
};
|
||||||
|
@ -90,6 +90,12 @@ pub fn Stream(comptime Handler: type) type {
|
|||||||
else
|
else
|
||||||
log.warn("unimplemented execute: {x}", .{c}),
|
log.warn("unimplemented execute: {x}", .{c}),
|
||||||
|
|
||||||
|
// VT is same as LF
|
||||||
|
.VT => if (@hasDecl(T, "linefeed"))
|
||||||
|
try self.handler.linefeed()
|
||||||
|
else
|
||||||
|
log.warn("unimplemented execute: {x}", .{c}),
|
||||||
|
|
||||||
.CR => if (@hasDecl(T, "carriageReturn"))
|
.CR => if (@hasDecl(T, "carriageReturn"))
|
||||||
try self.handler.carriageReturn()
|
try self.handler.carriageReturn()
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user