summaryrefslogtreecommitdiff
path: root/src/File.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:31:19 -0300
committerGabriel Schneider <[email protected]>2026-11-05 01:16:28 -0300
commit2504b38647653db091aa7709afcea0dbe75f7a95 (patch)
tree2fefb992a86d2432c00ab4b431f65b649421a0dd /src/File.zig
parent2aa1801dbad2a26348aef085d9dee8096f8d2eb3 (diff)
downloadpardes-2504b38647653db091aa7709afcea0dbe75f7a95.tar.gz
pardes-2504b38647653db091aa7709afcea0dbe75f7a95.zip
normal, modal, File, edit: small ones: tryFind inlined (its clamp never bound), the smart-case haystack is allocLowerString, the two WordTargets nothing produces go, File.lineCount is modal.cursorLineCount's alias, and pasteRegister and ClipRequest share one Paste enum
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/File.zig')
-rw-r--r--src/File.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/File.zig b/src/File.zig
index ad76909d..43eccc49 100644
--- a/src/File.zig
+++ b/src/File.zig
@@ -589,9 +589,7 @@ test "the ASCII run in fitEnd cuts where the grapheme walk would" {
}
}
-pub fn lineCount(content: []const u8) usize {
- return std.mem.count(u8, content, "\n") + 1;
-}
+pub const lineCount = modal.cursorLineCount;
// Content changes invalidate this lazily rebuilt byte-offset index.
pub fn lineIndex(gpa: std.mem.Allocator, f: *State) ![]const usize {