diff options
Diffstat (limited to 'src/File.zig')
| -rw-r--r-- | src/File.zig | 4 |
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 { |
