Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ serde_json = "1.0"
tokio = { version = "1.39", features = ["rt-multi-thread", "macros", "time"] }
async-trait = "0.1"
pulldown-cmark = "0.12"
tempfile = "3.27"

# The profile that 'dist' will build with
[profile.dist]
Expand Down
1 change: 1 addition & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ See the [feature demo](DEMO.md) for a visual walkthrough of these capabilities i
- Scrollable help overlay with keyboard and mouse wheel controls; input stays in help until it is dismissed
- Configurable keybindings via `~/.config/blippy/keybinds.toml`
- Configurable close-comment presets in `~/.config/blippy/config.toml`
- Preset saves retain presets and configuration changes saved by other sessions
- Failed preset saves keep the editor and draft open so the write can be retried
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ See [FEATURES.md](FEATURES.md) for a full feature breakdown.

Bindings in `keybinds.toml` override `[keybinds]` in `config.toml`. Saving comment presets preserves each file's bindings, so removing an override restores the binding from the main config.

Saving a preset also keeps presets, themes, and bindings saved by other sessions since this session started. Failed writes leave the previous configuration intact so saving can be retried.

Theme example:

```toml
Expand Down
6 changes: 1 addition & 5 deletions src/app/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,7 @@ impl App {
}

pub fn save_comment_default(&mut self, preset: CommentDefault) -> Result<()> {
self.config.comment_defaults.push(preset);
if let Err(error) = self.config.save() {
self.config.comment_defaults.pop();
return Err(error);
}
self.config.save_comment_default(preset)?;
self.preset.choice = 0;
Ok(())
}
Expand Down
Loading
Loading