feat: add configurable whitespace markers
This commit is contained in:
@@ -1764,6 +1764,7 @@ pub struct Editor {
|
||||
labels: BTreeMap<String, String>,
|
||||
scroll_distance: Option<usize>,
|
||||
highlight_trailing_whitespace: bool,
|
||||
whitespace_characters: BTreeMap<char, char>,
|
||||
battery_charge: Option<u8>,
|
||||
battery_label: String,
|
||||
git_blame: bool,
|
||||
@@ -1867,6 +1868,7 @@ impl Editor {
|
||||
labels: BTreeMap::new(),
|
||||
scroll_distance: Some(0),
|
||||
highlight_trailing_whitespace: false,
|
||||
whitespace_characters: BTreeMap::new(),
|
||||
battery_charge: None,
|
||||
battery_label: String::new(),
|
||||
git_blame: true,
|
||||
@@ -2621,6 +2623,14 @@ impl Editor {
|
||||
self.highlight_trailing_whitespace = enabled;
|
||||
}
|
||||
|
||||
pub(crate) fn whitespace_characters(&self) -> &BTreeMap<char, char> {
|
||||
&self.whitespace_characters
|
||||
}
|
||||
|
||||
pub(crate) fn set_whitespace_characters(&mut self, characters: BTreeMap<char, char>) {
|
||||
self.whitespace_characters = characters;
|
||||
}
|
||||
|
||||
pub(crate) fn set_diff_context_options(&mut self, context_lines: usize, expand_lines: usize) {
|
||||
self.diff_context_options = (context_lines, expand_lines);
|
||||
if let Some(diff) = &mut self.diff {
|
||||
|
||||
Reference in New Issue
Block a user