mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
Merge pull request #687 from mitchellh/cancel
renderer: handle error.NotFound for timer cancellation
This commit is contained in:
@ -382,11 +382,13 @@ fn cursorCancelCallback(
|
||||
// support different sets of errors, so we just unify it.
|
||||
const CancelError = xev.Timer.CancelError || error{
|
||||
Canceled,
|
||||
NotFound,
|
||||
Unexpected,
|
||||
};
|
||||
|
||||
_ = r catch |err| switch (@as(CancelError, @errorCast(err))) {
|
||||
error.Canceled => {},
|
||||
error.Canceled => {}, // success
|
||||
error.NotFound => {}, // completed before it could cancel
|
||||
else => {
|
||||
log.warn("error in cursor cancel callback err={}", .{err});
|
||||
unreachable;
|
||||
|
Reference in New Issue
Block a user