From 9feaf5d70f7075199c4b517f7fe171318d951d5d Mon Sep 17 00:00:00 2001 From: DerTeta Date: Wed, 11 Aug 2021 00:08:53 +0200 Subject: [PATCH] Add the `DiffContextSize` setting to `GitConfig` It defaults to 3 lines, which is the default value for git. --- docs/Config.md | 1 + pkg/config/user_config.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/Config.md b/docs/Config.md index 5630516ac..020b4724a 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -76,6 +76,7 @@ git: overrideGpg: false # prevents lazygit from spawning a separate process when using GPG disableForcePushing: false parseEmoji: false + diffContextSize: 3 # how many lines of context are shown around a change in diffs os: editCommand: '' # see 'Configuring File Editing' section editCommandTemplate: '{{editor}} {{filename}}' diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index f9a2e8656..09895f66d 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -72,6 +72,7 @@ type GitConfig struct { // this shoudl really be under 'gui', not 'git' ParseEmoji bool `yaml:"parseEmoji"` Log LogConfig `yaml:"log"` + DiffContextSize int `yaml:"diffContextSize"` } type PagingConfig struct { @@ -359,6 +360,7 @@ func GetDefaultConfig() *UserConfig { DisableForcePushing: false, CommitPrefixes: map[string]CommitPrefixConfig(nil), ParseEmoji: false, + DiffContextSize: 3, }, Refresher: RefresherConfig{ RefreshInterval: 10,