From aabbccba49772cf73c7e35ae470245e9fda9d6ff Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 9 Nov 2026 02:22:05 -0300 Subject: locality: lsp_client's helpers beside their callers: query's (status with sourceName, indexCommand, nowUs, posOf, fromIndex with emitDefinitions, related and emitOcc), run's (syncDoc, byteCol, hierarchy with hierText), ensure's (rootOf, binOf), byteSpan with strictOffset beside renameEdits, pathOf beside emitAt; the connection block (ensure, handshake, reader) stays together; sam_edit's stepRune before Exec Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/sam_edit.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sam_edit.zig') diff --git a/src/sam_edit.zig b/src/sam_edit.zig index 173a559b..a2db0abc 100644 --- a/src/sam_edit.zig +++ b/src/sam_edit.zig @@ -30,12 +30,6 @@ const regexp = @import("regexp.zig"); const addr_lang = @import("ninep/addr.zig"); const modal = @import("modal.zig"); -/// The next place after `p` a search may start: a rune on, and past the -/// text's end once there, which ends a loop over `p <= end`. -fn stepRune(text: []const u8, p: usize) usize { - return if (p >= text.len) p + 1 else modal.nextRune(text, p); -} - pub const Range = addr_lang.Range; /// A change to the text as it was: `job`, when set, is a `<` or `|` whose @@ -564,6 +558,12 @@ const Parser = struct { const e_noname = "no file name given"; +/// The next place after `p` a search may start: a rune on, and past the +/// text's end once there, which ends a loop over `p <= end`. +fn stepRune(text: []const u8, p: usize) usize { + return if (p >= text.len) p + 1 else modal.nextRune(text, p); +} + const Exec = struct { arena: std.mem.Allocator, why: *Why, -- cgit v1.3