diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-09 02:14:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-09 02:21:58 -0300 |
| commit | bfb74e76ef7dfe305a26010edc86dac456034c3e (patch) | |
| tree | c90744aa2e0edf37c8e6cbc0033476230a086412 /src/edit.zig | |
| parent | c78d362fa20393621ac198861f891439f9d832e9 (diff) | |
| download | pardes-bfb74e76ef7dfe305a26010edc86dac456034c3e.tar.gz pardes-bfb74e76ef7dfe305a26010edc86dac456034c3e.zip | |
locality: single-caller helpers beside their caller: File's placeOf and restoreName beside undoStep, Query's row makers (clearPlaces, makeAllRows, makeNameRows, feedGrepPlaces) beside produce, look's helpers beside lookAt, lookSpanIn and lookUnresolved, mouse's beside handleMouse and dragUpdate, normal's beside handleNormal and executeNormalAction, and the rest in Core, draw, exec, layout, main, modal, replica, syntax, terminal; Messages.printRight into draw.zig beside joinNotice and edit.spanHas into exec.zig beside operandAt, their only callers
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/edit.zig')
| -rw-r--r-- | src/edit.zig | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/edit.zig b/src/edit.zig index 3de16c34..5b2630fb 100644 --- a/src/edit.zig +++ b/src/edit.zig @@ -345,13 +345,6 @@ pub fn sweepEnds(sl: Pane.Sel) struct { [2]i32, [2]i32 } { return if (fwd) .{ .{ sl.r0, sl.c0 }, .{ sl.r1, sl.c1 } } else .{ .{ sl.r1, sl.c1 }, .{ sl.r0, sl.c0 } }; } -pub fn spanHas(r: i32, c: i32, ar: i32, ac: i32, br: i32, bc: i32) bool { - const fwd = ar < br or (ar == br and ac <= bc); - const sr, const sc = if (fwd) .{ ar, ac } else .{ br, bc }; - const er, const ec = if (fwd) .{ br, bc } else .{ ar, ac }; - return (r > sr or (r == sr and c >= sc)) and (r < er or (r == er and c <= ec)); -} - /// the active modal selection as text, if any pub fn currentSelText(p: *Pardes, pane: *Pane) ?[]const u8 { if (pane.addon) |k| if (k.selection.len > 0) return k.selection; |
