Commit Graph

3 Commits

Author SHA1 Message Date
Tim Culverhouse 7585a54832 split: prevent panic when store is not set
Prevent panic when split is called but the msgstore is either not
initialized or has no UIDs. This condition could be triggered by calling
:split or :vsplit immediately at startup.

Use the same logic as the :view command, which could operate in a
similar manner.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-10-19 23:52:39 +02:00
Tim Culverhouse bd8a4feecc split: prevent opening split when no messages are selected
The [v]split command panics when it is run with no message selected, or
when messages aren't loaded. Check for a valid selected message before
creating a split, and report an error if one isn't selected.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-10-19 21:50:26 +02:00
Tim Culverhouse bad694e466 ui: add :split and :vsplit view options
Add :split and :vsplit commands, which split the message list view to
include a message viewer. Each command takes an int, or a delta value
("+1", "-1"). The int value is the resulting size of the message list,
and a new message viewer will be displayed below / to the right of the
message list. This viewer *does not* set seen flags.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-10-18 22:25:35 +02:00