fixup for running the tests

There is no mux when running the tab tests, so allow for that
to fail when we're trying to dispatch notifications.
This commit is contained in:
Wez Furlong committed 2023-03-24 17:33:07 -07:00
1 parent 604ef152be
commit 2c6ec574c2
1 file changed
+6 -6
+6 -6
View File
@@ -893,7 +893,7 @@ impl TabInner {
self.zoomed.replace(pane);
}
}
Mux::get().notify(MuxNotification::TabResized(self.id));
Mux::try_get().map(|mux| mux.notify(MuxNotification::TabResized(self.id)));
}
fn contains_pane(&self, pane: PaneId) -> bool {
@@ -982,7 +982,7 @@ impl TabInner {
}
}
}
Mux::get().notify(MuxNotification::TabResized(self.id));
Mux::try_get().map(|mux| mux.notify(MuxNotification::TabResized(self.id)));
}
fn iter_panes_impl(&mut self, respect_zoom_state: bool) -> Vec<PositionedPane> {
@@ -1163,7 +1163,7 @@ impl TabInner {
apply_sizes_from_splits(self.pane.as_mut().unwrap(), &size);
}
Mux::get().notify(MuxNotification::TabResized(self.id));
Mux::try_get().map(|mux| mux.notify(MuxNotification::TabResized(self.id)));
}
fn apply_pane_size(&mut self, pane_size: TerminalSize, cursor: &mut Cursor) {
@@ -1233,7 +1233,7 @@ impl TabInner {
self.size = size;
}
}
Mux::get().notify(MuxNotification::TabResized(self.id));
Mux::try_get().map(|mux| mux.notify(MuxNotification::TabResized(self.id)));
}
fn resize_split_by(&mut self, split_index: usize, delta: isize) {
@@ -1266,7 +1266,7 @@ impl TabInner {
// Now cursor is looking at the split
self.adjust_node_at_cursor(&mut cursor, delta);
self.cascade_size_from_cursor(cursor);
Mux::get().notify(MuxNotification::TabResized(self.id));
Mux::try_get().map(|mux| mux.notify(MuxNotification::TabResized(self.id)));
}
fn adjust_node_at_cursor(&mut self, cursor: &mut Cursor, delta: isize) {
@@ -1349,7 +1349,7 @@ impl TabInner {
}
}
}
Mux::get().notify(MuxNotification::TabResized(self.id));
Mux::try_get().map(|mux| mux.notify(MuxNotification::TabResized(self.id)));
}
fn adjust_pane_size(&mut self, direction: PaneDirection, amount: usize) {