feat: don't log file browser completion messages
This commit is contained in:
parent
e752e8a405
commit
67f49110dc
2 changed files with 16 additions and 2 deletions
|
@ -265,7 +265,7 @@ pub fn Create(options: type) type {
|
|||
} else {
|
||||
try self.construct_path(self.query.items, self.entries.items[self.complete_trigger_count - 1], self.complete_trigger_count - 1);
|
||||
}
|
||||
log.logger("file_browser").print("{d}/{d}", .{ self.matched_entry + 1, self.entries.items.len });
|
||||
message("{d}/{d}", .{ self.matched_entry + 1, self.entries.items.len });
|
||||
}
|
||||
|
||||
fn construct_path(self: *Self, path_: []const u8, entry: Entry, entry_no: usize) !void {
|
||||
|
@ -300,7 +300,7 @@ pub fn Create(options: type) type {
|
|||
try self.construct_path(self.query.items, entry, last_no);
|
||||
self.complete_trigger_count = matched;
|
||||
} else {
|
||||
log.logger("file_browser").print("no match for '{s}'", .{self.match.items});
|
||||
message("no match for '{s}'", .{self.match.items});
|
||||
try self.construct_path(self.query.items, .{ .name = self.match.items, .type = .file }, 0);
|
||||
}
|
||||
}
|
||||
|
@ -322,5 +322,10 @@ pub fn Create(options: type) type {
|
|||
self.file_path.clearRetainingCapacity();
|
||||
}
|
||||
}
|
||||
|
||||
fn message(comptime fmt: anytype, args: anytype) void {
|
||||
var buf: [256]u8 = undefined;
|
||||
tp.self_pid().send(.{ "message", std.fmt.bufPrint(&buf, fmt, args) catch @panic("too large") }) catch {};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue