diff options
author | Alexey Yerin <yyp@disroot.org> | 2021-04-27 21:22:35 +0300 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-04-28 10:13:54 +0200 |
commit | b455cc9ad7694268346e26fc44a7f6cd7524e877 (patch) | |
tree | 271bdf9fded36b54393dc8ce35b7b9cff0473286 /app.go | |
parent | Make sure app.s is not nil when issuing quit (diff) |
Make mouse support optional
To not break existing users, mouse is enabled by default but you have an
option to disable it with "mouse: false" in your
/.confg/senpai/senpai.yaml.
Diffstat (limited to '')
-rw-r--r-- | app.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -52,12 +52,18 @@ func NewApp(cfg Config) (app *App, err error) { } } + mouse := true + if cfg.Mouse != nil { + mouse = *cfg.Mouse + } + app.win, err = ui.New(ui.Config{ NickColWidth: cfg.NickColWidth, ChanColWidth: cfg.ChanColWidth, AutoComplete: func(cursorIdx int, text []rune) []ui.Completion { return app.completions(cursorIdx, text) }, + Mouse: mouse, }) if err != nil { return |