configurable directory collapse default value (closes #70)

This commit is contained in:
Alex Goodman committed 2018-11-23 21:49:21 -05:00
1 parent e153cb4f4a
commit 64d1a3bcc3
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -98,6 +98,7 @@ func initConfig() {
viper.SetDefault("diff.hide", "")
viper.SetDefault("layer.show-aggregated-changes", false)
viper.SetDefault("filetree.collapse-dir", false)
viper.AutomaticEnv() // read in environment variables that match
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"crypto/md5"
"fmt"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
"io"
)
@@ -61,7 +62,7 @@ func (data *NodeData) Copy() *NodeData {
// NewViewInfo creates a default ViewInfo
func NewViewInfo() (view *ViewInfo) {
return &ViewInfo{
Collapsed: false,
Collapsed: viper.GetBool("filetree.collapse-dir"),
Hidden: false,
}
}