Johan Rong 6 päivää sitten
vanhempi
sitoutus
7754354560
2 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 2 0
      internal/editor/config.go
  2. 2 0
      internal/editor/model.go

+ 2 - 0
internal/editor/config.go

@@ -49,4 +49,6 @@ func DefaultConfig() Config {
 }
 
 func (m *Model) ReloadConfig() {
+	m.Config.StyleDefault = m.Config.StyleDefault.Background(tcell.GetColor(m.Config.Style.MainBackground)).Foreground(tcell.GetColor(m.Config.Style.MainForeground))
+	m.Screen.SetStyle(m.Config.StyleDefault)
 }

+ 2 - 0
internal/editor/model.go

@@ -34,6 +34,8 @@ func NewModel(screen tcell.Screen) Model {
 		ShouldQuit: false,
 	}
 
+	model.ReloadConfig()
+
 	return model
 }
 func (m *Model) CurrentActionSet() []Action {