소스 검색

Fix coloring

Johan Rong 6 일 전
부모
커밋
7754354560
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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 {