refactor: remove intermediate var
This commit is contained in:
parent
3260c07438
commit
0243039600
2 changed files with 1 additions and 4 deletions
|
|
@ -49,7 +49,6 @@ func newMessageInput(cfg *config.Config) *messageInput {
|
|||
}
|
||||
|
||||
mi.Box = ui.NewConfiguredBox(mi.Box, &cfg.Theme)
|
||||
|
||||
mi.
|
||||
SetTextStyle(tcell.StyleDefault.Background(tcell.GetColor(cfg.Theme.BackgroundColor))).
|
||||
SetClipboard(func(s string) {
|
||||
|
|
|
|||
|
|
@ -49,8 +49,6 @@ func newMessagesText(cfg *config.Config) *messagesText {
|
|||
}
|
||||
|
||||
mt.Box = ui.NewConfiguredBox(mt.Box, &cfg.Theme)
|
||||
|
||||
t := cfg.Theme
|
||||
mt.
|
||||
SetDynamicColors(true).
|
||||
SetRegions(true).
|
||||
|
|
@ -60,7 +58,7 @@ func newMessagesText(cfg *config.Config) *messagesText {
|
|||
SetTitle("Messages").
|
||||
SetInputCapture(mt.onInputCapture)
|
||||
|
||||
markdown.DefaultRenderer.AddOptions(renderer.WithOption("theme", t.MessagesText))
|
||||
markdown.DefaultRenderer.AddOptions(renderer.WithOption("theme", cfg.Theme.MessagesText))
|
||||
return mt
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue