╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────╮ │src/ui/Repo/Refs.zig│ ╰────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │242 if (data.next) |n| try items.append(allocator, .{ .text = "next →", .link = try windowLink(session.page_arena, identity, kind, n, search) }); │ │243 │ │244 var scroll = blk: { │ │245 - var flow = try ui.widget.TagFlow.init(allocator); │ │245 + var flow = try ui.widget.WordFlow.init(allocator); │ │246 errdefer flow.deinit(allocator); │ │247 try flow.setItems(allocator, items.items); │ │248 - break :blk try wgt.Scroll(ui.Widget).init(allocator, .{ .tag_flow = flow }, .{ .direction = .vert, .web_native = !session.is_terminal, .fill = true }); │ │248 + break :blk try wgt.Scroll(ui.Widget).init(allocator, .{ .word_flow = flow }, .{ .direction = .vert, .web_native = !session.is_terminal, .fill = true });│ │249 }; │ │250 errdefer scroll.deinit(allocator); │ │251 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │364 return &self.columns().children.values()[index].widget.box.children.values()[1].widget.scroll;│ │365 } │ │366 │ │367 - fn flowAt(self: *View, index: usize) *ui.widget.TagFlow { │ │368 - return &self.scrollAt(index).child.tag_flow; │ │367 + fn flowAt(self: *View, index: usize) *ui.widget.WordFlow { │ │368 + return &self.scrollAt(index).child.word_flow; │ │369 } │ │370 │ │371 - fn rowStart(flow: *ui.widget.TagFlow, item: usize) bool { │ │371 + fn rowStart(flow: *ui.widget.WordFlow, item: usize) bool { │ │372 const rects = flow.rects.items; │ │373 return item == 0 or rects[item - 1].y != rects[item].y; │ │374 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │375 │ │376 - fn rowEnd(flow: *ui.widget.TagFlow, item: usize) bool { │ │376 + fn rowEnd(flow: *ui.widget.WordFlow, item: usize) bool { │ │377 const rects = flow.rects.items; │ │378 return item + 1 == rects.len or rects[item + 1].y != rects[item].y;│ │379 } │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭────────────────────────────────────────╮ │20 stack: wgt.Stack(Widget), │ │21 flow_box: FlowBox, │ │22 flow_box_scroll: FlowBox.Scroll,│ │23 - tag_flow: TagFlow, │ │23 + word_flow: WordFlow, │ │24 spacer: Spacer, │ │25 center: Center, │ │26 section_label: SectionLabel, │ ╰────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │457 // available width, like words in a paragraph. unlike FlowBox there is no cell│ │458 // grid: each item is as wide as its text. selection movement is driven by the│ │459 // owning view via indexOfFocusId/verticalNeighbor. │ │460 -pub const TagFlow = struct { │ │460 +pub const WordFlow = struct { │ │461 focus: *Focus, │ │462 grid: ?Grid, │ │463 text_boxes: std.ArrayList(wgt.TextBox), │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │469 │ │470 pub const Item = struct { text: []const u8, link: []const u8 = "" };│ │471 │ │472 - pub fn init(allocator: std.mem.Allocator) !TagFlow { │ │472 + pub fn init(allocator: std.mem.Allocator) !WordFlow { │ │473 return .{ │ │474 .focus = try Focus.create(allocator, .container), │ │475 .grid = null, │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────╮ │479 }; │ │480 } │ │481 │ │482 - pub fn deinit(self: *TagFlow, allocator: std.mem.Allocator) void { │ │482 + pub fn deinit(self: *WordFlow, allocator: std.mem.Allocator) void {│ │483 self.focus.destroy(allocator); │ │484 if (self.grid) |*grid| { │ │485 grid.deinit(); │ ╰────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │493 │ │494 // the text box copies the item text; links are copied into the arena, so the │ │495 // caller's slices needn't outlive this call. │ │496 - pub fn setItems(self: *TagFlow, allocator: std.mem.Allocator, items: []const Item) !void { │ │496 + pub fn setItems(self: *WordFlow, allocator: std.mem.Allocator, items: []const Item) !void {│ │497 for (self.text_boxes.items) |*tb| tb.deinit(allocator); │ │498 self.text_boxes.clearAndFree(allocator); │ │499 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │520 } │ │521 } │ │522 │ │523 - pub fn build(self: *TagFlow, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void { │ │523 + pub fn build(self: *WordFlow, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void {│ │524 self.clearGrid(); │ │525 self.focus.clear(); │ │526 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │569 self.grid = grid; │ │570 } │ │571 │ │572 - pub fn input(self: *TagFlow, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void { │ │572 + pub fn input(self: *WordFlow, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │573 _ = self; │ │574 _ = allocator; │ │575 _ = key; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯