summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/draw.zig25
-rw-r--r--src/look.zig6
2 files changed, 2 insertions, 29 deletions
diff --git a/src/draw.zig b/src/draw.zig
index f4c43631..e141ce31 100644
--- a/src/draw.zig
+++ b/src/draw.zig
@@ -14,7 +14,6 @@ const modal = @import("modal.zig");
const tracy = @import("tracy.zig");
const colors = @import("colors.zig");
const edit = @import("edit.zig");
-const mouse = @import("mouse.zig");
const tagline = @import("tagline.zig");
const body_layer = @import("body_layer.zig");
const Messages = @import("Messages.zig");
@@ -697,28 +696,8 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
s.addRegion(.{ .kind = .guide, .rect = .{ .x = d.cur_x, .y = placement.row, .w = 1, .h = 1 } });
};
},
- // A hover left over from a bigger window points past this one.
- .none, .select => if (p.pointer_inside and p.hover_row < s.rows and p.hover_col < s.cols) {
- // hover hints on a pane's own trailing edge
- var c: usize = 0;
- while (c + 1 < p.ncol) : (c += 1) {
- if (p.hover_col == p.col_x[c] + p.col_w[c] -| 1) {
- var row: u16 = p.topBarHeight();
- while (row < s.rows) : (row += 1) s.overlayDash(p.hover_col, row, "╎");
- s.addRegion(.{ .kind = .guide, .rect = .{ .x = p.hover_col, .y = p.topBarHeight(), .w = 1, .h = s.rows -| p.topBarHeight() } });
- }
- }
- // No hint over a pane's last row: a row of text is no handle; two
- // panes resize by the rule between them or by the grip.
- for (0..p.ncol -| 1) |cn| {
- if (p.hover_col != p.col_x[cn] + p.col_w[cn] -| 1) continue;
- if (mouse.seamIdxAt(p, cn, p.hover_row) != null) continue;
- if (mouse.seamIdxAt(p, cn + 1, p.hover_row) == null) continue;
- var col = p.col_x[cn + 1];
- while (col < p.col_x[cn + 1] + p.col_w[cn + 1]) : (col += 1) s.overlayDash(col, p.hover_row, "╌");
- s.addRegion(.{ .kind = .guide, .rect = .{ .x = p.col_x[cn + 1], .y = p.hover_row, .w = p.col_w[cn + 1], .h = 1 } });
- }
- },
+ // A hover draws no hint: columns resize by their grips.
+ .none, .select => {},
}
// debug overlay: a small stats box drawn last, top-right ("Debug")
diff --git a/src/look.zig b/src/look.zig
index ede7d910..1a574212 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -2010,15 +2010,9 @@ test "Look hover waits without mutating the pane and input cancels it" {
const seam_x = p.col_x[0] + p.col_w[0] - 1;
p.update(.{ .mouse = .{ .button = .none, .kind = .motion, .col = seam_x, .row = body_y } });
- _ = frame.reset(.retain_capacity);
- const hovered_seam = try p.render(frame.allocator());
- try std.testing.expectEqualStrings("╎", hovered_seam.at(seam_x, body_y).grapheme());
p.update(.pointer_leave);
try std.testing.expect(p.look_hover_wait == null);
try std.testing.expect(p.look_hover_preview == null);
- _ = frame.reset(.retain_capacity);
- const left_seam = try p.render(frame.allocator());
- try std.testing.expect(!std.mem.eql(u8, "╎", left_seam.at(seam_x, body_y).grapheme()));
const blank_x = rect.x + config.GUTTER + config.PREFIX_W + 30;
p.update(.{ .mouse = .{ .button = .none, .kind = .motion, .col = blank_x, .row = body_y } });