aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrooks J Rady <b.j.rady@gmail.com>2021-01-06 17:06:15 +0000
committerBrooks J Rady <b.j.rady@gmail.com>2021-01-06 17:06:15 +0000
commitb2720169fb32da7b665f2462ee414fee08c38e4d (patch)
tree09f6892d875c8a6b9c19d087a47bd78ff76c4963 /src
parentThe RawFd has been slain... (diff)
downloadsl0ppij-b2720169fb32da7b665f2462ee414fee08c38e4d.tar.gz
sl0ppij-b2720169fb32da7b665f2462ee414fee08c38e4d.tar.xz
sl0ppij-b2720169fb32da7b665f2462ee414fee08c38e4d.zip
Fix early quit with plugins
Diffstat (limited to 'src')
-rw-r--r--src/screen.rs2
-rw-r--r--src/tab.rs20
2 files changed, 11 insertions, 11 deletions
diff --git a/src/screen.rs b/src/screen.rs
index c321f43d..88607814 100644
--- a/src/screen.rs
+++ b/src/screen.rs
@@ -150,7 +150,7 @@ impl Screen {
}
pub fn render(&mut self) {
if let Some(active_tab) = self.get_active_tab_mut() {
- if active_tab.get_active_terminal().is_some() {
+ if active_tab.get_active_pane().is_some() {
active_tab.render();
} else {
self.close_tab();
diff --git a/src/tab.rs b/src/tab.rs
index 880a092c..16af135e 100644
--- a/src/tab.rs
+++ b/src/tab.rs
@@ -440,9 +440,9 @@ impl Tab {
}
}
}
- pub fn get_active_terminal(&self) -> Option<&Box<dyn Pane>> {
- match self.get_active_terminal_id() {
- Some(active_terminal) => self.panes.get(&PaneId::Terminal(active_terminal)),
+ pub fn get_active_pane(&self) -> Option<&Box<dyn Pane>> {
+ match self.get_active_pane_id() {
+ Some(active_pane) => self.panes.get(&active_pane),
None => None,
}
}
@@ -469,7 +469,7 @@ impl Tab {
}
pub fn write_to_active_terminal(&mut self, input_bytes: Vec<u8>) {
if let Some(active_terminal_id) = &self.get_active_terminal_id() {
- let active_terminal = self.get_active_terminal().unwrap();
+ let active_terminal = self.get_active_pane().unwrap();
let mut adjusted_input = active_terminal.adjust_input_to_terminal(input_bytes);
self.os_api
.write_to_tty_stdin(*active_terminal_id, &mut adjusted_input)
@@ -481,7 +481,7 @@ impl Tab {
}
pub fn get_active_terminal_cursor_position(&self) -> Option<(usize, usize)> {
// (x, y)
- let active_terminal = &self.get_active_terminal()?;
+ let active_terminal = &self.get_active_pane()?;
active_terminal
.cursor_coordinates()
.map(|(x_in_terminal, y_in_terminal)| {
@@ -493,7 +493,7 @@ impl Tab {
pub fn toggle_active_pane_fullscreen(&mut self) {
if let Some(active_pane_id) = self.get_active_pane_id() {
if self
- .get_active_terminal()
+ .get_active_pane()
.unwrap()
.position_and_size_override()
.is_some()
@@ -1415,7 +1415,7 @@ impl Tab {
if self.fullscreen_is_active {
return;
}
- let active_terminal = self.get_active_terminal();
+ let active_terminal = self.get_active_pane();
if let Some(active) = active_terminal {
let terminals = self.get_panes();
let next_index = terminals
@@ -1445,7 +1445,7 @@ impl Tab {
if self.fullscreen_is_active {
return;
}
- let active_terminal = self.get_active_terminal();
+ let active_terminal = self.get_active_pane();
if let Some(active) = active_terminal {
let terminals = self.get_panes();
let next_index = terminals
@@ -1475,7 +1475,7 @@ impl Tab {
if self.fullscreen_is_active {
return;
}
- let active_terminal = self.get_active_terminal();
+ let active_terminal = self.get_active_pane();
if let Some(active) = active_terminal {
let terminals = self.get_panes();
let next_index = terminals
@@ -1505,7 +1505,7 @@ impl Tab {
if self.fullscreen_is_active {
return;
}
- let active_terminal = self.get_active_terminal();
+ let active_terminal = self.get_active_pane();
if let Some(active) = active_terminal {
let terminals = self.get_panes();
let next_index = terminals