summaryrefslogtreecommitdiff
path: root/src/edit.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 20:26:51 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commitab0bd455004c0b7374a6183d45e42b85877f370e (patch)
treed35e93c1f4edb82bda0c0d0d701a9aa09d33d6e3 /src/edit.zig
parent2b388888348860097967ae04d03f68c00a70472c (diff)
downloadpardes-ab0bd455004c0b7374a6183d45e42b85877f370e.tar.gz
pardes-ab0bd455004c0b7374a6183d45e42b85877f370e.zip
tag_layer.zig folds into Layer.zig, whose TagHit its two functions work on
Two functions (sameCell, columnAt) on Layer.TagHit, 32 lines with their imports, used by edit.zig, mouse.zig and look.zig: they sit with the type now, called Layer.sameCell and Layer.columnAt. docs/design.typ names Layer.zig in its place. No behaviour changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/edit.zig')
-rw-r--r--src/edit.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/edit.zig b/src/edit.zig
index 183d6325..26062029 100644
--- a/src/edit.zig
+++ b/src/edit.zig
@@ -17,7 +17,7 @@ const syntax = @import("syntax.zig");
const platform = pardes.platform;
const Pane = panes.Pane;
const Text = panes.Text;
-const tag_layer = @import("tag_layer.zig");
+const Layer = @import("Layer.zig");
const TagHit = pardes.TagHit;
const BOX_H = pardes.BOX_H;
const TAG_TEXT_INSET = pardes.TAG_TEXT_INSET;
@@ -2108,7 +2108,7 @@ pub fn pointerTextSelection(p: *const Pardes, id: usize, col: u16, row: u16, bod
const v = @as(i32, mapped_hit.row) + pane.tag_rows;
return .{ .sel = .{ .state = .dragging, .c0 = c, .c1 = c, .r0 = v, .r1 = v }, .on_tag = false };
};
- const tag_col = if (on_tag) tag_layer.columnAt(p, .pane, id, tag_hit, false, row - tag_y) else null;
+ const tag_col = if (on_tag) Layer.columnAt(p, .pane, id, tag_hit, false, row - tag_y) else null;
const c: i32 = (if (tag_col) |value| @as(i32, value) else @as(i32, col) - @as(i32, r.x + (if (on_tag) TAG_TEXT_INSET else config.GUTTER))) +
(if (on_tag) @as(i32, pane.tag_scroll) else 0);
const v: i32 = if (on_tag) @as(i32, row) - @as(i32, tag_y) else @as(i32, row) - @as(i32, body_y) + @as(i32, pane.tag_rows);