mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
some logging improvements
This commit is contained in:
@ -16,7 +16,6 @@ const libuv = @import("libuv/main.zig");
|
||||
const Pty = @import("Pty.zig");
|
||||
const Command = @import("Command.zig");
|
||||
const SegmentedPool = @import("segmented_pool.zig").SegmentedPool;
|
||||
const frame = @import("tracy/tracy.zig").frame;
|
||||
const trace = @import("tracy/tracy.zig").trace;
|
||||
const max_timer = @import("max_timer.zig");
|
||||
const terminal = @import("terminal/main.zig");
|
||||
|
@ -77,7 +77,7 @@ pub fn init(alloc: Allocator, cols: usize, rows: usize) !Terminal {
|
||||
.rows = rows,
|
||||
.active_screen = .primary,
|
||||
// TODO: configurable scrollback
|
||||
.screen = try Screen.init(alloc, rows, cols, 1000),
|
||||
.screen = try Screen.init(alloc, rows, cols, 10000),
|
||||
// No scrollback for the alternate screen
|
||||
.secondary_screen = try Screen.init(alloc, rows, cols, 0),
|
||||
.tabstops = try Tabstops.init(alloc, cols, TABSTOP_INTERVAL),
|
||||
|
@ -43,14 +43,17 @@ pub fn Stream(comptime Handler: type) type {
|
||||
/// Process the next character and call any callbacks if necessary.
|
||||
pub fn next(self: *Self, c: u8) !void {
|
||||
const tracy = trace(@src());
|
||||
tracy.value(@intCast(u64, c));
|
||||
defer tracy.end();
|
||||
|
||||
//log.debug("char: {x}", .{c});
|
||||
const actions = self.parser.next(c);
|
||||
for (actions) |action_opt| {
|
||||
if (action_opt) |action| {
|
||||
if (action != .print) {
|
||||
log.info("action: {}", .{action});
|
||||
}
|
||||
}
|
||||
switch (action_opt orelse continue) {
|
||||
.print => |p| if (@hasDecl(T, "print")) try self.handler.print(p),
|
||||
.execute => |code| try self.execute(code),
|
||||
|
Reference in New Issue
Block a user