summaryrefslogtreecommitdiffstats
path: root/src/terminal
AgeCommit message (Collapse)Author
2020-12-01terminal/cells: return success flag in CellBuffer::resize()Manos Pitsidianakis
2020-11-28Fix theme_default not being respectedManos Pitsidianakis
2020-11-28Move Color to src/terminal/color.rsManos Pitsidianakis
2020-11-28listing: scroll account sidebar menuManos Pitsidianakis
Closes #85 Accounts sidebar doesn't scroll
2020-11-25Add align_area() and Alignment enumManos Pitsidianakis
2020-10-18terminal/embed: remove some allocations and unwrapsManos Pitsidianakis
2020-10-16terminal/embed: remove unwraps from kill() callsManos Pitsidianakis
If child process has exited, this will panic.
2020-10-14Add opt-in mouse supportManos Pitsidianakis
Sidebar width can be resized with mouse hold and drag.
2020-08-26terminal/keys: add `Space` identifier in Key Display implManos Pitsidianakis
2020-08-02terminal/cells.rs: fix resize to grow actually making the grid smallerManos Pitsidianakis
2020-08-02terminal/cells: resize growable grid when exactly at boundsManos Pitsidianakis
2020-07-23input_thread: add atomic refcount to check if thread is deadManos Pitsidianakis
2020-07-06Fix clippy lintsManos Pitsidianakis
2020-06-26Fix pasted text not being registered immediatelyManos Pitsidianakis
Input thread reading from stdin should continue reading after receiving the magic BRACKET START sequence until receiving the BRACKET END sequence.
2020-06-23terminal/cells.rs: remove unused variablesManos Pitsidianakis
2020-06-12Fix rustfmt suggestionsManos Pitsidianakis
2020-06-10Use BTreeSet instead of HashSet in copy_area()Manos Pitsidianakis
I kind of forgot about BTreeSets, and kept a separate HashSet and sorted index of the set's keys.
2020-06-08regexp: add priority field to regular expressionsManos Pitsidianakis
2020-06-08Add Cell::keep_attrs() methodManos Pitsidianakis
2020-06-05Add "regexp" feature, format text with regexpsManos Pitsidianakis
`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" }
2020-06-05terminal: add FormatTag, text format tagsManos Pitsidianakis
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.
2020-05-31pager: fix filter invocation and ansi parsingManos Pitsidianakis
2020-05-29terminal/ansi: add attribute supportManos Pitsidianakis
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.
2020-05-29Overhaul input threadManos Pitsidianakis
Remove raw/non raw distinction. Use a pipe for input thread commands and poll stdin/pipe for events
2020-05-28Execute user shell commands with /bin/shManos Pitsidianakis
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.
2020-05-28conf: add options for loggingManos Pitsidianakis
Add options for log file location and maximum log level. Also add manpage entries for these options in `meli.conf.5`
2020-04-05Add Italics, Blink, Dim and Hidden text attributesManos Pitsidianakis
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
2020-03-12Add various logic checksManos Pitsidianakis
2020-02-28Detect breaks on write_string_to_gridManos Pitsidianakis
2020-02-27Forward input on input/rawinput switchManos Pitsidianakis
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.
2020-02-26Implement search for CellBufferManos Pitsidianakis
2020-02-25Fix create_box boundary fg colorManos Pitsidianakis
2020-02-08ui: add ThemeAttribute argument to clear_area()Manos Pitsidianakis
clear_area() sets the cleared cell attributes according to the new argument.
2020-02-08ui: move box drawing to src/terminalManos Pitsidianakis
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).
2020-02-08Fix drawing getting stuck in empty terminalManos Pitsidianakis
Fix drawing getting stuck in loops when terminal is too small by checking for it.
2020-02-04Remove text_processingManos Pitsidianakis
Unwrap text_processing into melib In preparation for uploading meli as a separate crate on crates.io.
2020-02-04Remove ui crateManos Pitsidianakis
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.