summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 01:14:37 -0300
committerGabriel Schneider <[email protected]>2026-10-01 01:35:12 -0300
commite6ff64843b4a8986e9740c576f346690217cf5a7 (patch)
treedc710049d45abfabe79cf4ae22331c6879ea661d /src/pardes.zig
parent006fdc1d758fc2f9b956051e75f31a0122bd7883 (diff)
downloadpardes-e6ff64843b4a8986e9740c576f346690217cf5a7.tar.gz
pardes-e6ff64843b4a8986e9740c576f346690217cf5a7.zip
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 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig1
1 files changed, 1 insertions, 0 deletions
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 => {