aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/exline.go
diff options
context:
space:
mode:
authorKalyan Sriram <coder.kalyan@gmail.com>2020-07-27 01:03:55 -0700
committerReto Brunner <reto@labrat.space>2020-08-06 21:42:06 +0200
commit905cb9dfd3ef197bb4b59039a1be76ce2c8e3099 (patch)
tree2d923c42ec224b1d525d942a7bb17416f4a62dd5 /widgets/exline.go
parent548a5fff68a648a5e0b6fd909e3c21463addc8af (diff)
downloadaerc-905cb9dfd3ef197bb4b59039a1be76ce2c8e3099.tar.gz
Implement style configuration.
Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
Diffstat (limited to 'widgets/exline.go')
-rw-r--r--widgets/exline.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/widgets/exline.go b/widgets/exline.go
index 6def938e..692c8e21 100644
--- a/widgets/exline.go
+++ b/widgets/exline.go
@@ -15,13 +15,14 @@ type ExLine struct {
tabcomplete func(cmd string) []string
cmdHistory lib.History
input *ui.TextInput
+ conf *config.AercConfig
}
func NewExLine(conf *config.AercConfig, cmd string, commit func(cmd string), finish func(),
tabcomplete func(cmd string) []string,
cmdHistory lib.History) *ExLine {
- input := ui.NewTextInput("").Prompt(":").Set(cmd)
+ input := ui.NewTextInput("", conf.Ui).Prompt(":").Set(cmd)
if conf.Ui.CompletionPopovers {
input.TabComplete(tabcomplete, conf.Ui.CompletionDelay)
}
@@ -31,6 +32,7 @@ func NewExLine(conf *config.AercConfig, cmd string, commit func(cmd string), fin
tabcomplete: tabcomplete,
cmdHistory: cmdHistory,
input: input,
+ conf: conf,
}
input.OnInvalidate(func(d ui.Drawable) {
exline.Invalidate()
@@ -41,7 +43,7 @@ func NewExLine(conf *config.AercConfig, cmd string, commit func(cmd string), fin
func NewPrompt(conf *config.AercConfig, prompt string, commit func(text string),
tabcomplete func(cmd string) []string) *ExLine {
- input := ui.NewTextInput("").Prompt(prompt)
+ input := ui.NewTextInput("", conf.Ui).Prompt(prompt)
if conf.Ui.CompletionPopovers {
input.TabComplete(tabcomplete, conf.Ui.CompletionDelay)
}