From 7fb9e8fa9a8983acb312515fbe849d15954a3557 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 27 Nov 2024 19:45:47 +0100 Subject: [PATCH] Respect the diff context size when showing a range diff This applies to both the "sticky" range diff when diffing mode is on, and the more temporary one when selecting a range of commits. --- pkg/commands/git_commands/diff.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/commands/git_commands/diff.go b/pkg/commands/git_commands/diff.go index aecd669207c..d7121db9925 100644 --- a/pkg/commands/git_commands/diff.go +++ b/pkg/commands/git_commands/diff.go @@ -29,6 +29,7 @@ func (self *DiffCommands) DiffCmdObj(diffArgs []string) oscommands.ICmdObj { Arg("--submodule"). Arg(fmt.Sprintf("--color=%s", self.UserConfig().Git.Paging.ColorArg)). ArgIf(ignoreWhitespace, "--ignore-all-space"). + Arg(fmt.Sprintf("--unified=%d", self.AppState.DiffContextSize)). Arg(diffArgs...). Dir(self.repoPaths.worktreePath). ToArgv(),