diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-22 09:50:43 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-22 10:03:24 -0300 |
| commit | a8b457a306a4442975210bcac3f04b56513c61c3 (patch) | |
| tree | 6e2026ecb15da2fb919a0202f5d8b38e3b36a595 /src/exec.zig | |
| parent | a8a1499bdffffc5b6919e24ec957e92fabaf003b (diff) | |
| parent | 7e9d2c4169245072265b483ffaa6aa05f23f08d3 (diff) | |
| download | pardes-a8b457a306a4442975210bcac3f04b56513c61c3.tar.gz pardes-a8b457a306a4442975210bcac3f04b56513c61c3.zip | |
Merge: Def/Refs, the diff viewer, Helix n/N, Callstack, Zig 0.17, Window mode and the terminal cwd fix onto 0.24
The docs keep both sides: 0.24's Ctrl-i fallbacks and typed ls with this
line's Window mode, raw Esc and Helix n/N wording. The CHANGELOG's
unreleased entries go above 0.24, Def/Refs and the context rows among
them. cheatsheet-a4.pdf rendered again; .scratch/ ignored.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/exec.zig')
| -rw-r--r-- | src/exec.zig | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/exec.zig b/src/exec.zig index 2a6bd55c..d03a4a48 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -140,7 +140,7 @@ pub fn operandAt(p: *Pardes, pane: *Pane, clicked: Pane.Sel, borrow: bool, for_l &pane.body, wrapped.line, wrapped.at, - clicked.c0 - (if (pane.file != null) @as(i32, panes.File.gutterWidth(pane)) else 0), + clicked.c0 - wrapped.pad - (if (pane.file != null) @as(i32, panes.File.gutterWidth(pane)) else 0), ) else clicked.c0; @@ -214,9 +214,9 @@ pub fn operandAt(p: *Pardes, pane: *Pane, clicked: Pane.Sel, borrow: bool, for_l const last = pane.wrapRow(row, hi - 1); if (first.row < 0 or last.row < 0) return result; expanded.r0 = first.row + @as(i32, pane.tag_rows); - expanded.c0 = @as(i32, panes.File.gutterWidth(pane)) + panes.File.displayOffset(pane, row, first.at, 0); + expanded.c0 = @as(i32, panes.File.gutterWidth(pane)) + first.pad + panes.File.displayOffset(pane, row, first.at, 0); expanded.r1 = last.row + @as(i32, pane.tag_rows); - expanded.c1 = @as(i32, panes.File.gutterWidth(pane)) + panes.File.displayEndOffset(pane, row, last.at, hi - 1); + expanded.c1 = @as(i32, panes.File.gutterWidth(pane)) + last.pad + panes.File.displayEndOffset(pane, row, last.at, hi - 1); } else { const shown = if (raw) raw_line else line; expanded.c0 = 0; @@ -242,9 +242,9 @@ pub fn operandAt(p: *Pardes, pane: *Pane, clicked: Pane.Sel, borrow: bool, for_l const last = pane.wrapRow(row, hi - 1); if (first.row >= 0 and last.row >= 0) { expanded.r0 = first.row + @as(i32, pane.tag_rows); - expanded.c0 = @as(i32, panes.File.gutterWidth(pane)) + panes.File.displayOffset(pane, row, first.at, lo); + expanded.c0 = @as(i32, panes.File.gutterWidth(pane)) + first.pad + panes.File.displayOffset(pane, row, first.at, lo); expanded.r1 = last.row + @as(i32, pane.tag_rows); - expanded.c1 = @as(i32, panes.File.gutterWidth(pane)) + panes.File.displayEndOffset(pane, row, last.at, hi - 1); + expanded.c1 = @as(i32, panes.File.gutterWidth(pane)) + last.pad + panes.File.displayEndOffset(pane, row, last.at, hi - 1); } result.preview = expanded; result.expanded = expanded; @@ -1120,6 +1120,12 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[] } if (!p.settings.apply(setting, want)) p.reportFailure(p.active, "Shell: takes " ++ comptime config.Runtime.takes(.shell).?); }, + .callstack_depth => if (arg == null) { + var said: [40]u8 = undefined; + return p.setMessage(p.active, std.fmt.bufPrint(&said, "CallstackDepth {d}", .{p.settings.callstack_depth}) catch "CallstackDepth"); + } else if (!p.settings.apply(setting, arg)) { + p.reportFailure(p.active, "CallstackDepth: takes " ++ comptime config.Runtime.takes(.callstack_depth).?); + }, // Bare, it says the width, as acme's Tab does. .tab => if (arg == null) { var said: [32]u8 = undefined; |
