Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-tui/src/terminal.rs')
-rw-r--r--helix-tui/src/terminal.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/helix-tui/src/terminal.rs b/helix-tui/src/terminal.rs
index 969b285c..9dcad81d 100644
--- a/helix-tui/src/terminal.rs
+++ b/helix-tui/src/terminal.rs
@@ -24,12 +24,14 @@ pub struct Viewport {
#[derive(Debug)]
pub struct Config {
pub enable_mouse_capture: bool,
+ pub force_enable_extended_underlines: bool,
}
-impl From<EditorConfig> for Config {
- fn from(config: EditorConfig) -> Self {
+impl From<&EditorConfig> for Config {
+ fn from(config: &EditorConfig) -> Self {
Self {
enable_mouse_capture: config.mouse,
+ force_enable_extended_underlines: config.undercurl,
}
}
}
@@ -102,16 +104,16 @@ where
})
}
- pub fn claim(&mut self, config: Config) -> io::Result<()> {
- self.backend.claim(config)
+ pub fn claim(&mut self) -> io::Result<()> {
+ self.backend.claim()
}
pub fn reconfigure(&mut self, config: Config) -> io::Result<()> {
self.backend.reconfigure(config)
}
- pub fn restore(&mut self, config: Config) -> io::Result<()> {
- self.backend.restore(config)
+ pub fn restore(&mut self) -> io::Result<()> {
+ self.backend.restore()
}
// /// Get a Frame object which provides a consistent view into the terminal state for rendering.