diff options
Diffstat (limited to 'core/body_layer.zig')
| -rw-r--r-- | core/body_layer.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig index 5e23a415..9e7f6f08 100644 --- a/core/body_layer.zig +++ b/core/body_layer.zig @@ -1322,13 +1322,15 @@ test "a motion root's level paints its targets in place of their lines' numbers, p.update(.{ .key = .{ .cp = 'g', .text = "g" } }); try std.testing.expectEqual(@as(i32, 5), pane.body.cur_row); for ("4k") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }); - // `g`: its first and last lines. + // `g`: its first and last lines; its first under the level's rows + // drawn over the body's top (UX DESIGN I1: a target on a covered line + // is hidden until rest), its last painted. p.update(.{ .key = .{ .cp = 'g' } }); p.advance(p.clock.now_ns); p.clock.now_ns = p.view().tag_state.due_ns; _ = frame.reset(.retain_capacity); s = try p.render(a); - try std.testing.expect(std.mem.indexOfScalar(u8, Field.of(s, gutter, body.y, number, &buf), 'g') != null); + try std.testing.expect(pardes.Band.covered(p, pane, id).over > 0); try std.testing.expect(std.mem.indexOfScalar(u8, Field.of(s, gutter, body.y + 6, number, &buf), 'e') != null); p.update(.{ .key = .{ .cp = Key.escape } }); // `m` unrolled, its cursor on `i`: the inside of the braces around the |
