From e6ff64843b4a8986e9740c576f346690217cf5a7 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 01:14:37 -0300 Subject: A +Pager pane whose text is a diff is drawn and looked at as a diff, as a diff command pane is: git diff, show and log -p page into review With git paging into +Pager, a diff arrived as plain text: no colour for its sides and a right click on a hunk line searched the word. A +Pager pane now notes, as its text is set, whether its first 64 KiB holds a diff header or a unified hunk, and such a pane takes the diff highlighting and the diff look every diff pane has. Co-Authored-By: Claude Opus 5.5 --- src/pardes.zig | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 84b891e5..5d0ab7e8 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4640,6 +4640,7 @@ pub const Pardes = struct { const named = try std.fs.path.join(gpa, &.{ dir, "+Pager" }); gpa.free(shown.file.?.path); shown.file.?.path = named; + shown.file.?.pager_diff = panes.File.looksLikeDiff(content[0..@min(content.len, 64 * 1024)]); p.oneColumn(); }, .embedded => { -- cgit v1.3