aboutsummaryrefslogtreecommitdiff
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorGalen Abell <galen@galenabell.com>2019-07-23 12:52:33 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-26 14:29:34 -0400
commit8635c70fda20b91f97c42f4e23e97bc01a14a89d (patch)
treeea70a40f7617782ca28060965ad253fa0e686161 /widgets/compose.go
parent67fb0938a66605a0b6a837005804637b348b250d (diff)
Add command history and cycling
Aerc will keep track of the previous 1000 commands, which the user can cycle through using the arrow keys while in the ex-line. Pressing up will move backwards in history while pressing down will move forward.
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index b45892f..4f6f7a1 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -51,7 +51,8 @@ func NewComposer(conf *config.AercConfig,
defaults["From"] = acct.From
}
- layout, editors, focusable := buildComposeHeader(conf.Compose.HeaderLayout, defaults)
+ layout, editors, focusable := buildComposeHeader(
+ conf.Compose.HeaderLayout, defaults)
header, headerHeight := layout.grid(
func(header string) ui.Drawable { return editors[header] },
@@ -90,7 +91,11 @@ func NewComposer(conf *config.AercConfig,
return c
}
-func buildComposeHeader(layout HeaderLayout, defaults map[string]string) (newLayout HeaderLayout, editors map[string]*headerEditor, focusable []ui.DrawableInteractive) {
+func buildComposeHeader(layout HeaderLayout, defaults map[string]string) (
+ newLayout HeaderLayout,
+ editors map[string]*headerEditor,
+ focusable []ui.DrawableInteractive,
+) {
editors = make(map[string]*headerEditor)
focusable = make([]ui.DrawableInteractive, 0)