summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-08-28 13:09:55 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-09-05 13:55:30 +0200
commit7774fe0ab37bb07832ef7349a3f7c080f9d908e1 (patch)
tree3dde7e09c8f6ca80de2e0ec01b4c943c92a6d01d /pkg/config
parentf7db17f7d05280d83d57f7266dbc4e9d3ba2c48a (diff)
Move diff context size from UserConfig to AppState
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/app_config.go2
-rw-r--r--pkg/config/user_config.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index ea26dd872..54d41b695 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -322,6 +322,7 @@ type AppState struct {
CustomCommandsHistory []string
HideCommandLog bool
IgnoreWhitespaceInDiffView bool
+ DiffContextSize int
}
func getDefaultAppState() *AppState {
@@ -329,6 +330,7 @@ func getDefaultAppState() *AppState {
LastUpdateCheck: 0,
RecentRepos: []string{},
StartupPopupVersion: 0,
+ DiffContextSize: 3,
}
}
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go
index 0acfcfb9b..4df6b5676 100644
--- a/pkg/config/user_config.go
+++ b/pkg/config/user_config.go
@@ -95,9 +95,8 @@ type GitConfig struct {
DisableForcePushing bool `yaml:"disableForcePushing"`
CommitPrefixes map[string]CommitPrefixConfig `yaml:"commitPrefixes"`
// this should really be under 'gui', not 'git'
- ParseEmoji bool `yaml:"parseEmoji"`
- Log LogConfig `yaml:"log"`
- DiffContextSize int `yaml:"diffContextSize"`
+ ParseEmoji bool `yaml:"parseEmoji"`
+ Log LogConfig `yaml:"log"`
}
type PagingConfig struct {
@@ -497,7 +496,6 @@ func GetDefaultConfig() *UserConfig {
DisableForcePushing: false,
CommitPrefixes: map[string]CommitPrefixConfig(nil),
ParseEmoji: false,
- DiffContextSize: 3,
},
Refresher: RefresherConfig{
RefreshInterval: 10,