radicle-heartwood-lfs/radicle-term/src
Fintan Halpenny 0d402647cb
term: allow Editor to be reusable
The `Editor` is very useful for correctly opening a text editor and making changes
to some initial input. The current use of `Editor` is only for getting input for
commets.

However, it would also be useful for opening up a text editor on some other
existing files or text, for example, in the command `rad config edit`.

The `Editor` struct was changed to have two new options, `truncate` and
`cleanup`, to allow the user of the struct to dictate whether existing text is
truncated, and if the underlying file should be remove.

The original `new` method is now named `comment`, mimicing the existing
construction of a temporary `RAD_COMMENT` file.

The new version of `new` accepts any file for the `Editor` and will open it
without truncating or removing the file.

`Editor` is now used for the `rad config edit` command.
2024-11-11 11:27:33 +01:00
..
ansi term: Have a way to set the default terminal 2023-12-22 12:15:34 +01:00
ansi.rs term: Overhaul rendering 2023-09-27 12:37:41 +02:00
args.rs Initialize `radicle-term` crate 2023-03-06 10:22:50 +01:00
cell.rs term: Fix unicode display width hack 2023-11-17 15:05:39 +01:00
colors.rs term: Overhaul rendering 2023-09-27 12:37:41 +02:00
command.rs Initialize `radicle-term` crate 2023-03-06 10:22:50 +01:00
editor.rs term: allow Editor to be reusable 2024-11-11 11:27:33 +01:00
element.rs cli: Use new pager for `rad diff` 2024-05-03 14:31:08 +02:00
format.rs cli: Improve pretty diff printing 2024-07-12 16:36:04 +02:00
hstack.rs term: Overhaul rendering 2023-09-27 12:37:41 +02:00
io.rs cli: Unify all syncing code 2024-03-22 16:35:06 +01:00
label.rs cli: improve Author labels 2024-01-09 13:44:46 +01:00
lib.rs term: Implement content-aware pager 2024-05-03 14:31:05 +02:00
pager.rs cli: Handle interrupts during an active spinner 2024-07-18 15:47:18 +02:00
spinner.rs cli: Handle interrupts during an active spinner 2024-07-18 15:47:18 +02:00
table.rs term: Don't print empty tables 2024-06-12 15:36:34 +02:00
textarea.rs term: Fix line width bug with tabs 2024-01-04 14:02:05 +01:00
vstack.rs cli: Improve pretty diff printing 2024-07-12 16:36:04 +02:00