Adding ourselves to our contacts doesn't make sense (in the generic
case) so remove them from the list that is shown when the user selects
the add contacts shortcut.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
When printing and line-breaking a string in CellBuffer::write_string(),
the line should continue from the "beginning" of the previous one.
However it might be different than the offset of the first character of
the string, because it may be indented already.
This would result in awkward line breaks like:
Available actions: [ list- |# end of terminal/border
post, list-unsubscribe, lis|
t-archive ]
This commit adds an extra argument to write_string() to specify the x
offset of the string, so that we can apply it while printing characters
but ignore it when the line changes; then the x coordinate will take the
value of the line_break value.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Add imap-shell to tools subcommand.
To use, run
$ meli tools imap-shell <account-name>
Where account name is what you have in your config file.
For convenience, typing an invalid name will list all the valid names:
$ meli tools imap-shell "asdf"
The configuration file does not contain the account `asdf`. It contains the following:
user@example.com
work
personal account
Try again with a valid account name.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Add tools subcommand, with options to launch imap, smtp or jmap shells.
Currently only smtp is implemented, imap is working but with quirks.
To use, run
$ meli tools smtp-shell <account-name>
Where account name is what you have in your config file.
For convenience, typing an invalid name will list all the valid names:
$ meli tools smtp-shell "asdf"
The configuration file does not contain the account `asdf`. It contains the following:
user@example.com
work
personal account
Try again with a valid account name.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
If true, text presentations of color symbols and emoji will be enforced
as much as possible.
Might not work on all non-text symbols and is experimental.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
ShellExpandTrait::expand was not used consistently, leading to only some
functionalities supporting things like tilde expansion.
Fixes#387
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
CellBuffer::resize does not update generation info and should only be
used from within Screen::resize
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
self.force_draw was not reset back to false after drawing, so it was
constantly being redrawn until meli becomes unresponsive.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
columns[0] was jused in every for loop instead of columns[n], which
would make the debug_assert_eq(area generation, column generation) panic
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Re-implemnts horizontal thread view.
Default is still vertical, but pressing toggle_layout now has an effect.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
If contact entries in the add contact dialog are too many to fit in the
dialog area, show a scrollbar and allow the user to navigate it.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Implement hashing for Card.
This fixes the appearance of duplicate entries in the add contacts
selector in an envelope view when an address appears more than one time
in the envelope headers.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Store children process metadata. Pid and command lines can then be shown
in the UI and in logs.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
prev_entry, next_entry shortcuts (default bindings: Ctrl+p and Ctrl+n)
were not behaving consistently in all different listing index styles. In
particular in some conditions the switch entry shortcuts worked at most
once because the cursor position was not updated properly. This commit
fixes that.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Add a default mailbox setting:
> The mailbox that is the default to open / view for this account. Must be
> a valid mailbox name.
>
> If not specified, the default is [`Self::root_mailbox`].
Closes: #350
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
In the next commits we will add a `default_mailbox` field. Instead of
poluting the `Account` struct with more setting fields, consolidate them
on its `settings`.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
accounts.rs is getting rather long (almost 3K lines) so split standalone
stuff in submodules.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Prevent accessing a ThreadView if it has not been initialized by making
an uninitialized ThreadView impossible.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>