feat: configure command and search popup anchors
This commit is contained in:
+9
-1
@@ -1,4 +1,4 @@
|
||||
use crate::chrome::{ChromeLine, validate_name};
|
||||
use crate::chrome::{ChromeLine, PopupConfig, validate_name};
|
||||
use crate::clipboard::{ClipboardMode, SystemClipboard};
|
||||
use crate::diff::{DiffState, Focus, Operation, Outcome, Phase, RevisionTarget};
|
||||
use crate::files::{DockSide, FilePicker, FilePresentation, FileView};
|
||||
@@ -1354,6 +1354,7 @@ pub struct Editor {
|
||||
notification_visible: bool,
|
||||
top_bar: ChromeLine,
|
||||
bottom_bar: ChromeLine,
|
||||
popup: PopupConfig,
|
||||
labels: BTreeMap<String, String>,
|
||||
battery_charge: Option<u8>,
|
||||
battery_label: String,
|
||||
@@ -1447,6 +1448,7 @@ impl Editor {
|
||||
notification_visible: true,
|
||||
top_bar: ChromeLine::top(),
|
||||
bottom_bar: ChromeLine::bottom(),
|
||||
popup: PopupConfig::default(),
|
||||
labels: BTreeMap::new(),
|
||||
battery_charge: None,
|
||||
battery_label: String::new(),
|
||||
@@ -3846,6 +3848,12 @@ impl Editor {
|
||||
pub fn bottom_bar_config(&self) -> &ChromeLine {
|
||||
&self.bottom_bar
|
||||
}
|
||||
pub fn popup_config(&self) -> &PopupConfig {
|
||||
&self.popup
|
||||
}
|
||||
pub fn set_popup_config(&mut self, popup: PopupConfig) {
|
||||
self.popup = popup;
|
||||
}
|
||||
pub fn label(&self, name: &str) -> &str {
|
||||
self.labels.get(name).map_or("", String::as_str)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user