Skip to content

Commit

Permalink
Respect the diff context size when showing a range diff
Browse files Browse the repository at this point in the history
This applies to both the "sticky" range diff when diffing mode is on, and the
more temporary one when selecting a range of commits.
  • Loading branch information
stefanhaller committed Dec 1, 2024
1 parent 5cca4c7 commit 7fb9e8f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/commands/git_commands/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 7fb9e8f

Please sign in to comment.