Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Closes #85 Accounts sidebar doesn't scroll
|
|
|
|
|
|
If child process has exited, this will panic.
|
|
Sidebar width can be resized with mouse hold and drag.
|
|
|
|
|
|
|
|
|
|
|
|
Input thread reading from stdin should continue reading after receiving
the magic BRACKET START sequence until receiving the BRACKET END
sequence.
|
|
|
|
|
|
I kind of forgot about BTreeSets, and kept a separate HashSet and sorted
index of the set's keys.
|
|
|
|
|
|
`regexp` feature uses the pcre2 library to enable the user to define
regular expressions for matching text and applying text formatting to
the matches. An example from the theme configuration I used to test
this:
[terminal.themes.win95.text_format_regexps]
"listing.subject" = { "\\[[^\\]]*\\]" = { attrs = "Bold" } }
"listing.from" = { "\\<[^\\>]*\\>(?:(?:\\s*$)|(?=,))" = { attrs = "Italics" } }
[terminal.themes.win95.text_format_regexps."pager.envelope.body"]
"^>.*$" = { attrs = "Italics" }
"\\d+\\s?(?:(?:[KkMmTtGg]?[Bb])|(?:[KkMmTtGg][Bb]?)(?=\\s))" = { attrs = "Bold | Underline" }
|
|
FormatTag describes a set of attributes, colors that exist in a
tag_table field of CellBuffer. The field of tag_associations contains
the hash of a tag and the {start,end} index of the cells that have this
attribute. A tag can thus be used many times.
An example of use is
let t = self.pager.insert_tag(FormatTag {
attrs: Attr::ITALICS,
..Default::default()
});
debug!("FormatTag hash = {}", t);
let (width, height) = self.pager.size();
for i in 0..height {
if self.pager.content[(0, i)].ch() == '>' {
self.pager.set_tag(t, (0, i), (width.saturating_sub(1), i));
}
}
This will set reply lines in text as italics.
This feature interface is not used anywhere yet.
|
|
|
|
Add attribute escape sequence support in terminal::ansi, which handles
converting strings with ansi escape sequences into meli's internal
terminal structures in order to incorporate them into the UI.
|
|
Remove raw/non raw distinction.
Use a pipe for input thread commands and poll stdin/pipe for events
|
|
Execute user provided command invocations $CMD such as `editor_cmd` with
`/bin/sh` as `/bin/sh -c "$CMD"
Previously, user commands were split by whitespace which must trigger
erroneous behavior if quotes are involved.
|
|
Add options for log file location and maximum log level. Also add
manpage entries for these options in `meli.conf.5`
|
|
Text attributes have been rewritten as bit flags, so for example instead of
"BoldUnderline" you'd have to define "Bold | Underline" in your theme
settings.
Requested in #21
|
|
|
|
|
|
Input thread listens on stdin input and forwards the input to the main
process. When an embedded terminal is launched within the main process,
the input thread is asked to switch to raw input, that is to send the
parsed input and the raw bytes to the main process in order to get them
forwarded to the embedded terminal. The switch happens by calling
get_events and get_events_raw.
When the input thread receives an InputCommand::{No,}Raw, it has already
received an input event, since the `select!` is within the
stdin events for loop. (There's no way to `select` on blocking iterators
or raw fds, which is unfortunate.).
This commit forwards the input to the next function instead of dropping
it.
|
|
|
|
|
|
clear_area() sets the cleared cell attributes according to the new
argument.
|
|
No logical reason for it not to be in the terminal module anymore (the
set_and_join* functions predate the terminal module which is why they
weren't there to begin with).
|
|
Fix drawing getting stuck in loops when terminal is too small by
checking for it.
|
|
Unwrap text_processing into melib
In preparation for uploading meli as a separate crate on crates.io.
|
|
Merge ui crate with root crate.
In preparation for uploading `meli` as a separate crate on crates.io.
Workspace crates will need to be published as well and having a separate
`ui` crate and binary perhaps doesn't make sense anymore.
|