aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/compositor.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-03-29 01:01:02 +0000
committerBlaž Hrastnik2022-11-09 12:47:46 +0000
commit00d7b1809714b82f24542f5b9099649e10d5a0b5 (patch)
treed482151d4643760949f882ce7d61717a9c63e6da /helix-term/src/compositor.rs
parentb2e7171fedd501f2d804f95ed7eaf476d5e352ed (diff)
This term specific behavior really doesn't belong to compositor
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index ad1a29ab..1452d31f 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -76,7 +76,6 @@ pub trait Component: Any + AnyComponent {
}
use anyhow::Context as AnyhowContext;
-use tui::backend::Backend;
#[cfg(not(feature = "integration"))]
use tui::backend::CrosstermBackend;
@@ -92,7 +91,7 @@ type Terminal = tui::terminal::Terminal<TestBackend>;
pub struct Compositor {
layers: Vec<Box<dyn Component>>,
- terminal: Terminal,
+ pub terminal: Terminal,
area: Rect,
pub(crate) last_picker: Option<Box<dyn Component>>,
@@ -128,21 +127,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