this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

TextView: fix graphemes import

+6 -6
+6 -6
src/widgets/TextView.zig
··· 1 1 const std = @import("std"); 2 2 const vaxis = @import("../main.zig"); 3 - const grapheme = @import("grapheme"); 3 + const Graphemes = @import("Graphemes"); 4 4 const DisplayWidth = @import("DisplayWidth"); 5 5 const ScrollView = vaxis.widgets.ScrollView; 6 6 ··· 10 10 11 11 allocator: std.mem.Allocator, 12 12 buffer: *Buffer, 13 - gd: *const grapheme.GraphemeData, 13 + gd: *const Graphemes, 14 14 wd: *const DisplayWidth.DisplayWidthData, 15 15 16 16 pub fn write(self: @This(), bytes: []const u8) Error!usize { ··· 33 33 34 34 pub const Content = struct { 35 35 bytes: []const u8, 36 - gd: *const grapheme.GraphemeData, 36 + gd: *const Graphemes, 37 37 wd: *const DisplayWidth.DisplayWidthData, 38 38 }; 39 39 ··· 45 45 46 46 pub const Error = error{OutOfMemory}; 47 47 48 - grapheme: std.MultiArrayList(grapheme.Grapheme) = .{}, 48 + grapheme: std.MultiArrayList(Graphemes.Grapheme) = .{}, 49 49 content: std.ArrayListUnmanaged(u8) = .{}, 50 50 style_list: StyleList = .{}, 51 51 style_map: StyleMap = .{}, ··· 78 78 /// Appends content to the buffer. 79 79 pub fn append(self: *@This(), allocator: std.mem.Allocator, content: Content) Error!void { 80 80 var cols: usize = self.last_cols; 81 - var iter = grapheme.Iterator.init(content.bytes, content.gd); 81 + var iter = Graphemes.Iterator.init(content.bytes, content.gd); 82 82 const dw: DisplayWidth = .{ .data = content.wd }; 83 83 while (iter.next()) |g| { 84 84 try self.grapheme.append(allocator, .{ ··· 124 124 pub fn writer( 125 125 self: *@This(), 126 126 allocator: std.mem.Allocator, 127 - gd: *const grapheme.GraphemeData, 127 + gd: *const Graphemes, 128 128 wd: *const DisplayWidth.DisplayWidthData, 129 129 ) BufferWriter.Writer { 130 130 return .{