aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/compositor.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-24 00:23:16 +0000
committerNathan Vegdahl2021-07-24 00:23:16 +0000
commit43594049ddd6b0ec3794807016ab3cd2a6a38834 (patch)
tree56e0bd5b7ac016937612aa650de2f06041a2e258 /helix-term/src/compositor.rs
parent427ae6ac6cfdd2a89580692dadd45f1a8dc02d2c (diff)
parentbda4f5c1cdd2f84a06647f7dce45a8f6d06401ae (diff)
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index 5fcb552a..c2cfa3a7 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -74,6 +74,8 @@ type Terminal = tui::terminal::Terminal<CrosstermBackend<std::io::Stdout>>;
pub struct Compositor {
layers: Vec<Box<dyn Component>>,
terminal: Terminal,
+
+ pub(crate) last_picker: Option<Box<dyn Component>>,
}
impl Compositor {
@@ -83,6 +85,7 @@ impl Compositor {
Ok(Self {
layers: Vec::new(),
terminal,
+ last_picker: None,
})
}
@@ -103,8 +106,8 @@ impl Compositor {
self.layers.push(layer);
}
- pub fn pop(&mut self) {
- self.layers.pop();
+ pub fn pop(&mut self) -> Option<Box<dyn Component>> {
+ self.layers.pop()
}
pub fn handle_event(&mut self, event: Event, cx: &mut Context) -> bool {