╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ diff3.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
124 // buffer-backed lines are borrowed, so no free is needed 125 const line = try iter.get(line_num); 126 if (line_num > range.begin) try out.append(aa, '\n'); 127 try out.appendSlice(aa, line); 128 } 129 return try out.toOwnedSlice(aa); 130 } 131 132 fn textEqual(a: ?[]const u8, b: ?[]const u8) bool { 133 const a_text = a orelse return b == null; 134 const b_text = b orelse return false; 135 return std.mem.eql(u8, a_text, b_text); 136 } 137