╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Markdown.zig ─────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
493 for (0..if (self.repeat) grid.size.height else 1) |y| { 494 var x: usize = 0; 495 var utf8 = (try std.unicode.Utf8View.init(self.marker)).iterator(); 496 while (utf8.nextCodepoint()) |rune| { 497 (try grid.cell(x, y)).style = self.style; 498 try grid.setRune(x, y, rune); 499 x += xitui.width.cellWidth(rune); 500 } 501 } 502 if (child_grid) |g| { 503 try grid.drawGrid(g, marker_width, 0); 504 try self.focus.addChild(allocator, self.child.getFocus(), g.size, marker_width, 0); 505 } 506 self.grid = grid; 507 } 508 509 pub fn input(self: *Gutter, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void { 510 _ = self; 511 _ = allocator; 512 _ = key; 513 _ = root_focus; 514 } 515 516 pub fn clearGrid(self: *Gutter) void { 517 if (self.grid) |*grid| { 518 grid.deinit(); 519 self.grid = null; 520 } 521 self.child.clearGrid(); 522 } 523 524 pub fn getGrid(self: Gutter) ?Grid { 525 return self.grid; 526 } 527 528 pub fn getFocus(self: *Gutter) *Focus { 529 return self.focus; 530 } 531 }; 532