mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
remove some unreachables, log errors to avoid crashes
These are still TODO but we don't want to crash on bad input.
This commit is contained in:
@ -990,7 +990,11 @@ pub fn setCursorColAbsolute(self: *Terminal, col_req: usize) void {
|
|||||||
|
|
||||||
// TODO: test
|
// TODO: test
|
||||||
|
|
||||||
assert(!self.modes.get(.origin)); // TODO
|
// TODO
|
||||||
|
if (!self.modes.get(.origin)) {
|
||||||
|
log.err("setCursorColAbsolute: cursor origin mode handling not implemented yet", .{});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (self.status_display != .main) return; // TODO
|
if (self.status_display != .main) return; // TODO
|
||||||
|
|
||||||
@ -1116,7 +1120,6 @@ pub fn eraseLine(
|
|||||||
|
|
||||||
else => {
|
else => {
|
||||||
log.err("unimplemented erase line mode: {}", .{mode});
|
log.err("unimplemented erase line mode: {}", .{mode});
|
||||||
@panic("unimplemented");
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1216,8 +1216,7 @@ const StreamHandler = struct {
|
|||||||
pub fn setCursorRow(self: *StreamHandler, row: u16) !void {
|
pub fn setCursorRow(self: *StreamHandler, row: u16) !void {
|
||||||
if (self.terminal.modes.get(.origin)) {
|
if (self.terminal.modes.get(.origin)) {
|
||||||
// TODO
|
// TODO
|
||||||
log.err("setCursorRow: implement origin mode", .{});
|
log.err("setCursorRow: unimplemented origin mode handling, misrendering may occur", .{});
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.terminal.setCursorPos(row, self.terminal.screen.cursor.x + 1);
|
self.terminal.setCursorPos(row, self.terminal.screen.cursor.x + 1);
|
||||||
|
Reference in New Issue
Block a user