aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/editor.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 3c530c4e..dd360a78 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -702,6 +702,7 @@ pub enum WhitespaceRender {
default: Option<WhitespaceRenderValue>,
space: Option<WhitespaceRenderValue>,
nbsp: Option<WhitespaceRenderValue>,
+ nnbsp: Option<WhitespaceRenderValue>,
tab: Option<WhitespaceRenderValue>,
newline: Option<WhitespaceRenderValue>,
},
@@ -733,6 +734,14 @@ impl WhitespaceRender {
}
}
}
+ pub fn nnbsp(&self) -> WhitespaceRenderValue {
+ match *self {
+ Self::Basic(val) => val,
+ Self::Specific { default, nnbsp, .. } => {
+ nnbsp.or(default).unwrap_or(WhitespaceRenderValue::None)
+ }
+ }
+ }
pub fn tab(&self) -> WhitespaceRenderValue {
match *self {
Self::Basic(val) => val,
@@ -756,6 +765,7 @@ impl WhitespaceRender {
pub struct WhitespaceCharacters {
pub space: char,
pub nbsp: char,
+ pub nnbsp: char,
pub tab: char,
pub tabpad: char,
pub newline: char,
@@ -766,6 +776,7 @@ impl Default for WhitespaceCharacters {
Self {
space: '·', // U+00B7
nbsp: '⍽', // U+237D
+ nnbsp: '␣', // U+2423
tab: '→', // U+2192
newline: '⏎', // U+23CE
tabpad: ' ',