Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs19
1 files changed, 2 insertions, 17 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index c02727f8..a07896bd 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -69,12 +69,12 @@ pub trait Component: Any + AnyComponent {
use anyhow::Error;
use std::io::stdout;
-use tui::backend::{Backend, CrosstermBackend};
+use tui::backend::CrosstermBackend;
type Terminal = tui::terminal::Terminal<CrosstermBackend<std::io::Stdout>>;
pub struct Compositor {
layers: Vec<Box<dyn Component>>,
- terminal: Terminal,
+ pub terminal: Terminal,
area: Rect,
pub(crate) last_picker: Option<Box<dyn Component>>,
@@ -105,21 +105,6 @@ impl Compositor {
self.area = self.terminal.size().expect("couldn't get terminal size");
}
- pub fn save_cursor(&mut self) {
- if self.terminal.cursor_kind() == CursorKind::Hidden {
- self.terminal
- .backend_mut()
- .show_cursor(CursorKind::Block)
- .ok();
- }
- }
-
- pub fn load_cursor(&mut self) {
- if self.terminal.cursor_kind() == CursorKind::Hidden {
- self.terminal.backend_mut().hide_cursor().ok();
- }
- }
-
pub fn push(&mut self, mut layer: Box<dyn Component>) {
let size = self.size();
// trigger required_size on init