From bfb74e76ef7dfe305a26010edc86dac456034c3e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 9 Nov 2026 02:14:21 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/edit.zig | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/edit.zig') 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; -- cgit v1.3