summaryrefslogtreecommitdiff
path: root/src/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 00:30:46 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit232bfbbc4371a1fe9df210874118b4450dce7f9d (patch)
tree6af9cfcc6e741082b15a270a6d80d3d182301ce5 /src/panes.zig
parent42748f92b77367db415c8b4d0f2e537a9e1ddde7 (diff)
downloadpardes-232bfbbc4371a1fe9df210874118b4450dce7f9d.tar.gz
pardes-232bfbbc4371a1fe9df210874118b4450dce7f9d.zip
Let a pane's tag take a row for each line it holds
A tag that is a text can hold a newline, and the tagline, the body under it and the pointer all assumed one row. The pane's tag now takes a row per line (up to eight, and never the body's last row); the body starts below it, the rows a pointer counts start the body after the tag's lines, a click on any line puts the tag's cursor there, and a pixel shell gets a tag layer per line. A tag of one line draws exactly as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/panes.zig')
-rw-r--r--src/panes.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/panes.zig b/src/panes.zig
index 720f655f..6887008c 100644
--- a/src/panes.zig
+++ b/src/panes.zig
@@ -25,7 +25,7 @@ pub const EditText = struct { text: []u8, row0: i32 };
pub const Pane = struct {
/// One mouse selection (block-shaped), per button. c/r are text-area relative;
- /// r counts from the tag row (body starts at BOX_H).
+ /// r counts from the tag's first row (the body starts at Pane.tag_rows).
pub const Sel = struct {
state: enum { none, dragging, done } = .none,
source_id: u64 = 0,
@@ -121,6 +121,10 @@ pub const Pane = struct {
focus: Focus = .body,
/// Display columns hidden to reveal the tag caret; tag addresses stay whole.
tag_scroll: u16 = 0,
+ /// Rows the tag takes on screen: one per line of it, as many as the pane
+ /// has room for with a body row to spare. Set with the geometry in sync.
+ /// Pointer rows count from the tag's first, so a body starts at this one.
+ tag_rows: u16 = 1,
cwd: Cwd = .none,
hscroll: i32 = 0,
// Visible rows map to source lines and raw/display column origins.