Skip to content

Commit

Permalink
set defaults for new project -- fixes init splits layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Jul 23, 2024
1 parent 8be17c6 commit d5b995e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ func NewCodeWindow(path, projnm, root string, doPath bool) *Code {
}
b := core.NewBody(winm).SetTitle(winm)
cv := NewCode(b)
cv.Defaults()
b.AddAppBar(cv.MakeToolbar)
cv.Update() // get first pass so settings stick

Expand Down
3 changes: 2 additions & 1 deletion code/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,10 @@ func OpenPaths() {

// Defaults sets new project defaults based on overall settings
func (cv *Code) Defaults() {
cv.Settings.VersionControl = "git"
cv.Settings.Files = Settings.Files
cv.Settings.Editor = core.SystemSettings.Editor
cv.Settings.Splits = [4]float32{.1, .325, .325, .25}
cv.Settings.Splits = [4]float32{.1, .5, .5, .3}
cv.Settings.TabsUnder = true
cv.Settings.Debug = cdebug.DefaultParams
}
Expand Down

0 comments on commit d5b995e

Please sign in to comment.