fix: add missing system_paste support to file_browser

This commit is contained in:
CJ van den Berg 2024-10-28 19:45:13 +01:00
parent 0b6d820153
commit bd62dfcdc1
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -73,7 +73,12 @@ pub fn Create(options: type) type {
self.allocator.destroy(self);
}
pub fn receive(self: *Self, _: tp.pid_ref, _: tp.message) error{Exit}!bool {
pub fn receive(self: *Self, _: tp.pid_ref, m: tp.message) error{Exit}!bool {
var text: []const u8 = undefined;
if (try m.match(.{ "system_clipboard", tp.extract(&text) })) {
self.file_path.appendSlice(text) catch |e| return tp.exit_error(e, @errorReturnTrace());
}
self.update_mini_mode_text();
return false;
}