Merge pull request #262 from mitchellh/split-writes

update libxev to fix split writes on large writes (i.e. big paste)
This commit is contained in:
Mitchell Hashimoto
2023-08-09 10:17:36 -07:00
committed by GitHub
4 changed files with 15 additions and 5 deletions

View File

@@ -369,8 +369,15 @@ fn cursorCancelCallback(
_: *xev.Completion,
r: xev.Timer.CancelError!void,
) xev.CallbackAction {
_ = r catch |err| switch (err) {
error.NotFound => {},
// This makes it easier to work across platforms where different platforms
// support different sets of errors, so we just unify it.
const CancelError = xev.Timer.CancelError || error{
Canceled,
Unexpected,
};
_ = r catch |err| switch (@as(CancelError, @errSetCast(err))) {
error.Canceled => {},
else => {
log.warn("error in cursor cancel callback err={}", .{err});
unreachable;

View File

@@ -483,7 +483,7 @@ fn ttyWrite(
return .disarm;
};
_ = d;
//log.info("WROTE: {d}", .{status});
//log.info("WROTE: {d}", .{d});
return .disarm;
}