mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
don't crash on htab, but its not implemented yet
This commit is contained in:
@ -133,6 +133,7 @@ fn execute(self: *Terminal, c: u8) !void {
|
|||||||
switch (@intToEnum(ansi.C0, c)) {
|
switch (@intToEnum(ansi.C0, c)) {
|
||||||
.BEL => self.bell(),
|
.BEL => self.bell(),
|
||||||
.BS => self.backspace(),
|
.BS => self.backspace(),
|
||||||
|
.HT => self.horizontal_tab(),
|
||||||
.LF => self.linefeed(),
|
.LF => self.linefeed(),
|
||||||
.CR => self.carriage_return(),
|
.CR => self.carriage_return(),
|
||||||
}
|
}
|
||||||
@ -149,6 +150,11 @@ pub fn backspace(self: *Terminal) void {
|
|||||||
self.cursor.x -|= 1;
|
self.cursor.x -|= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// TODO
|
||||||
|
pub fn horizontal_tab(self: *Terminal) void {
|
||||||
|
_ = self;
|
||||||
|
}
|
||||||
|
|
||||||
/// Carriage return moves the cursor to the first column.
|
/// Carriage return moves the cursor to the first column.
|
||||||
pub fn carriage_return(self: *Terminal) void {
|
pub fn carriage_return(self: *Terminal) void {
|
||||||
self.cursor.x = 0;
|
self.cursor.x = 0;
|
||||||
|
@ -7,6 +7,8 @@ pub const C0 = enum(u7) {
|
|||||||
BEL = 0x07,
|
BEL = 0x07,
|
||||||
/// Backspace
|
/// Backspace
|
||||||
BS = 0x08,
|
BS = 0x08,
|
||||||
|
// Horizontal tab
|
||||||
|
HT = 0x09,
|
||||||
/// Line feed
|
/// Line feed
|
||||||
LF = 0x0A,
|
LF = 0x0A,
|
||||||
/// Carriage return
|
/// Carriage return
|
||||||
|
Reference in New Issue
Block a user