diff options
Diffstat (limited to 'test/behaviour/mouse.zig')
| -rw-r--r-- | test/behaviour/mouse.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/behaviour/mouse.zig b/test/behaviour/mouse.zig index 13c9b631..0abe15dc 100644 --- a/test/behaviour/mouse.zig +++ b/test/behaviour/mouse.zig @@ -70,10 +70,10 @@ test "mouse: a click past a line's or the file's end puts the caret where insert try mouse(&s, "m {d} {d} 1\nm {d} {d} 0\n", .{ x + 2 + 15, y + case.click_row, x + 2 + 15, y + case.click_row }); try std.testing.expectEqual(.{ case.dot, case.dot }, try s.range(s.at("/pane/{d}/dot", .{n}))); // The caret is drawn where it is, and insertion draws it there too. - try std.testing.expectEqual(.{ x + 2 + case.col, y + case.row }, try s.cursor()); + try std.testing.expectEqual(.{ x + 2 + case.col, y + case.row }, (try s.cursor()).?); if (!already_insert) try s.keys("i"); try std.testing.expect(std.mem.endsWith(u8, try s.read(s.at("/pane/{d}/ctl", .{n})), " mode:insert ")); - try std.testing.expectEqual(.{ x + 2 + case.col, y + case.row }, try s.cursor()); + try std.testing.expectEqual(.{ x + 2 + case.col, y + case.row }, (try s.cursor()).?); try s.keys("Z"); try s.expect(s.at("/pane/{d}/body", .{n}), case.result); } @@ -99,9 +99,9 @@ test "mouse: a click on a tab's or a wrapped wide glyph's cells puts the caret o const at: u32 = @intCast(try std.unicode.utf8CountCodepoints(source[0..std.mem.indexOf(u8, source, "界").?])); try std.testing.expectEqual(.{ at, at }, try s.range(s.at("/pane/{d}/dot", .{n}))); // Drawn on the glyph's first cell, in insert mode too. - try std.testing.expectEqual(.{ x, y }, try s.cursor()); + try std.testing.expectEqual(.{ x, y }, (try s.cursor()).?); if (!already_insert) try s.keys("i"); - try std.testing.expectEqual(.{ x, y }, try s.cursor()); + try std.testing.expectEqual(.{ x, y }, (try s.cursor()).?); try s.keys("Z"); const byte = std.mem.indexOf(u8, source, "界").?; try s.expect(s.at("/pane/{d}/body", .{n}), s.at("{s}Z{s}", .{ source[0..byte], source[byte..] })); |
