aerc/commands
Robin Jarry c26d08103b aerc: always check SelectedAccount return value
aerc.SelectedAccount() is used in lots of places. Most of them without
checking the return value.

In some cases, the currently selected tab is not related to any account
(widget.Terminal for example). This can lead to unexpected crashes when
accessing account specific configuration.

When possible, return an error when no account is currently selected.
If no error can be returned, fallback to non-account specific
configuration.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
2022-02-25 13:56:53 +01:00
..
account aerc: always check SelectedAccount return value 2022-02-25 13:56:53 +01:00
compose aerc: always check SelectedAccount return value 2022-02-25 13:56:53 +01:00
msg aerc: always check SelectedAccount return value 2022-02-25 13:56:53 +01:00
msgview aerc: always check SelectedAccount return value 2022-02-25 13:56:53 +01:00
terminal go.mod: change base git url 2021-11-05 10:21:45 +01:00
cd.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
choose.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
commands.go aerc: always check SelectedAccount return value 2022-02-25 13:56:53 +01:00
ct.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
exec.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
global.go Implement basic tab completion support 2019-06-29 14:24:19 -04:00
help.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
history.go Add command history and cycling 2019-07-26 14:29:34 -04:00
move-tab.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
new-account.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
next-tab.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
pin-tab.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
prompt.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
pwd.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
quit.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
set.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
term.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
util.go msgstore: fetch missing headers in visual mode 2022-01-22 17:07:50 +01:00