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/panes.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/panes.zig') diff --git a/src/panes.zig b/src/panes.zig index a395d6ed..9d1b7571 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -448,7 +448,7 @@ pub const Pane = struct { if (pane.isTerminal()) return .tty; if (pane.file) |f| { if (f.mini != null) return .source; - if (std.mem.endsWith(u8, f.path, ".diff") or std.mem.endsWith(u8, f.path, ".patch")) return .diff; + if (std.mem.endsWith(u8, f.path, ".diff") or std.mem.endsWith(u8, f.path, ".patch") or f.pager_diff) return .diff; if (f.output != null) { const tr = Output.fileTraits(f.output); if (tr.locations) return .locations; -- cgit v1.3