| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Refactor split logic (again...) to prevent stuck splits. Use callback
from msgstore.Select to tell the split which message to display. This
keeps the account from having to track displayed messages, which
prevents race conditions in certain situations.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Guessing a width/height with v?split is rather bothersome, using a
sensible value based on the user's terminal would be preferable. This
also prevents confusion when running :v?split without a number seemingly
does not open a split.
Initialize width as half the width of the message list and height as an
eight of the message list.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor split update logic to more simply update the split. Through the
evolution of the split logic, additional variables were stored within
the account which allows for cleaner updating of the split.
Compare selected UID instead of pointer to message when deciding not to
update split.
Allow splits to be created and closed when no message is selected. The
split will be filled with a ui.Fill (blank). The user will only see a
border at the split location when no message is selected.
Rename clearSplit to closeSplit, as it is only used in the case when the
user doesn't want a split anymore.
Ensure that the selected UID is reset to the magic UID when there are no
messages left in the message store.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The split command allows delta size changes, which triggers a condition
where the split can overflow into the dirlist. Clamp the minimum size of
a split or vsplit to "1" to prevent the view from overflowing, or
completely covering the message list. A split of 0 will still clear the
split.
Reported-by: Koni Marti <koni.marti@gmail.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|