diff options
author | Koni Marti <koni.marti@gmail.com> | 2024-06-14 23:13:59 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-06-23 22:14:21 +0200 |
commit | 910bc95af6e8cee59ab48cb5df2e7bea85b5c94a (patch) | |
tree | 60df37a558f3ecfe2d3427008904b2c828f07b3b /commands/account/mkdir.go | |
parent | 2c06df8720ccf9619fbc293be3c33965672667a9 (diff) | |
download | aerc-910bc95af6e8cee59ab48cb5df2e7bea85b5c94a.tar.gz |
dirlist: store previous folder info
Store the previous folder in the dirlist and retire the global 'history'
map in the commands package. This ensures that the previous folder is
always available when using ':cf -'.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/account/mkdir.go')
-rw-r--r-- | commands/account/mkdir.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/commands/account/mkdir.go b/commands/account/mkdir.go index 5ce7bbf4..13310665 100644 --- a/commands/account/mkdir.go +++ b/commands/account/mkdir.go @@ -45,14 +45,12 @@ func (m MakeDir) Execute(args []string) error { if acct == nil { return errors.New("No account selected") } - previous := acct.SelectedDirectory() acct.Worker().PostAction(&types.CreateDirectory{ Directory: m.Folder, }, func(msg types.WorkerMessage) { switch msg := msg.(type) { case *types.Done: app.PushStatus("Directory created.", 10*time.Second) - history[acct.Name()] = previous acct.Directories().Open(m.Folder, "", 0, nil, false) case *types.Error: app.PushError(msg.Error.Error()) |