this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

parser: return null events when unhandled

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>

+20 -5
+20 -5
src/parser.zig
··· 226 226 // codepoint 227 227 if (seq.param_idx < 1) { 228 228 log.warn("unhandled csi: CSI {s}", .{input[start + 1 .. i + 1]}); 229 - continue; 229 + return .{ 230 + .event = null, 231 + .n = i + 1, 232 + }; 230 233 } 231 234 switch (seq.params[0]) { 232 235 2 => break :blk Key.insert, ··· 262 265 57427 => break :blk Key.kp_begin, 263 266 else => { 264 267 log.warn("unhandled csi: CSI {s}", .{input[start + 1 .. i + 1]}); 265 - continue; 268 + return .{ 269 + .event = null, 270 + .n = i + 1, 271 + }; 266 272 }, 267 273 } 268 274 }, ··· 271 277 // response to our kitty query 272 278 // TODO: kitty query handling 273 279 log.warn("unhandled csi: CSI {s}", .{input[start + 1 .. i + 1]}); 274 - continue; 280 + return .{ 281 + .event = null, 282 + .n = i + 1, 283 + }; 275 284 } 276 285 if (seq.param_idx == 0) { 277 286 log.warn("unhandled csi: CSI {s}", .{input[start + 1 .. i + 1]}); 278 - continue; 287 + return .{ 288 + .event = null, 289 + .n = i + 1, 290 + }; 279 291 } 280 292 // In any csi u encoding, the codepoint 281 293 // directly maps to our keypoint definitions ··· 290 302 }, 291 303 else => { 292 304 log.warn("unhandled csi: CSI {s}", .{input[start + 1 .. i + 1]}); 293 - continue; 305 + return .{ 306 + .event = null, 307 + .n = i + 1, 308 + }; 294 309 }, 295 310 }; 296 311