diff options
author | Joe | 2022-07-05 10:44:16 +0000 |
---|---|---|
committer | GitHub | 2022-07-05 10:44:16 +0000 |
commit | b26e7e2e8fc900b5637d9772ecb74874e8794ecc (patch) | |
tree | 774d9e0a13cf88082a418eaa1779e00e16a141b4 /helix-term/src/ui | |
parent | 85411bed83615895f4138fa080c07c257631d7f7 (diff) |
Add live preview to theme picker (#1798)
* Add theme picker with live preview
* Add live theme preview to :theme command
* cargo fmt
* Fix clippy warnings
* Remove picker variant
* Remove unused import
* Cleanup
* Change current_theme to last_theme
* Fix accidental comment flash deletion
* Typo
* Remove theme cache
* Add some comments
* Refactor some theme handling
TIL flatmap on Option is called and_then
* Remove unnecessary renames
* Constrain last_theme theme preview lifecycle
* Switch to bitflag implementation
* Better handling of last_theme
* Sort theme names
* Better memory juggling
* Missed a branch
* Remove name from theme, switch bitand to &
* cargo fmt
* Update helix-view/src/editor.rs
* Switch boolean to enum
* Remove bitflag impl
* cargo fmt
* Remove un-needed type arg
* cargo fmt
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/mod.rs | 1 | ||||
-rw-r--r-- | helix-term/src/ui/picker.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 8d2bd325..ca4cedb5 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -237,6 +237,7 @@ pub mod completers { )); names.push("default".into()); names.push("base16_default".into()); + names.sort(); let mut names: Vec<_> = names .into_iter() diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index f4dd234a..375723e5 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -490,7 +490,7 @@ impl<T: Item + 'static> Component for Picker<T> { _ => return EventResult::Ignored(None), }; - let close_fn = EventResult::Consumed(Some(Box::new(|compositor: &mut Compositor, _| { + let close_fn = EventResult::Consumed(Some(Box::new(|compositor: &mut Compositor, _cx| { // remove the layer compositor.last_picker = compositor.pop(); }))); |