diff options
Diffstat (limited to 'test/panes.zig')
| -rw-r--r-- | test/panes.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/panes.zig b/test/panes.zig index 42dd6b77..3d2821aa 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -4853,7 +4853,7 @@ const LookResetTests = struct { try std.testing.expectEqualStrings("needle", selected(pane)); } - test "Look clears both source and existing destination selections before focus" { + test "Look clears the source's click highlight, not its dot, and the destination's selections before focus" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 }); defer p.deinit(); const source = try p.setTestFile("source\nlines\n"); @@ -4872,9 +4872,12 @@ const LookResetTests = struct { try seed(destination, "previous destination"); pardes.look.lookAt(p, 0, source.pointer_selections[0].?.raw_text.?); try std.testing.expectEqual(id, p.active); - try cleared(source); + // The source keeps its dot (acme's look leaves it); the click's + // highlight goes. + for (source.sel) |selection| try std.testing.expectEqual(.none, selection.state); + for (source.pointer_selections) |selection| try std.testing.expect(selection == null); + try std.testing.expect(source.body.vsel.active); try cleared(destination); - try std.testing.expect(!source.body.vsel.active); if (range) { try std.testing.expectEqual(@as(i32, 1), destination.body.cur_row); try std.testing.expectEqualStrings("rav", selected(destination)); |
