diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-02-26 22:41:54 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-02-26 22:42:01 -0500 |
commit | 661e3ec2a4dd97d4a8a8eab4f281b088770a6af2 (patch) | |
tree | 1f94f9a168642617690934deba2e5b712abb1834 /cmd | |
parent | 07f7cac2f3c5b7b74d16296d5afb57ff7e908130 (diff) | |
download | aerc-661e3ec2a4dd97d4a8a8eab4f281b088770a6af2.tar.gz |
Implement basic ex line input
TODO: - scrolling - commit/cancel - command history (via an external command history provider) - tab completion (via an external tab completion provider)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/aerc/main.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/aerc/main.go b/cmd/aerc/main.go index c784948..3ba9d1a 100644 --- a/cmd/aerc/main.go +++ b/cmd/aerc/main.go @@ -70,9 +70,8 @@ func main() { fill('.'), ui.BORDER_RIGHT)).At(1, 0).Span(2, 1) grid.AddChild(tabs.TabStrip).At(0, 1) grid.AddChild(tabs.TabContent).At(1, 1) - // ex line placeholder: - grid.AddChild(ui.NewText("Connected"). - Color(tb.ColorBlack, tb.ColorWhite)).At(2, 1) + exline := ui.NewExLine() + grid.AddChild(exline).At(2, 1) _ui, err := ui.Initialize(conf, grid) if err != nil { @@ -80,6 +79,8 @@ func main() { } defer _ui.Close() + _ui.AddInteractive(exline) + go (func() { for { time.Sleep(1 * time.Second) @@ -89,7 +90,8 @@ func main() { for !_ui.Exit { if !_ui.Tick() { - time.Sleep(100 * time.Millisecond) + // ~60 FPS + time.Sleep(16 * time.Millisecond) } } } |