aboutsummaryrefslogtreecommitdiff
path: root/src/app/ids.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/ids.rs')
-rw-r--r--src/app/ids.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/app/ids.rs b/src/app/ids.rs
index 9dc4371e..4bebedc6 100644
--- a/src/app/ids.rs
+++ b/src/app/ids.rs
@@ -141,4 +141,12 @@ impl App {
.find_map(|(pane_id, number)| (*number == pane_number).then_some(*pane_id))?;
Some((ws_idx, pane_id))
}
+
+ pub(crate) fn parse_current_public_pane_id(
+ &self,
+ id: &str,
+ ) -> Option<(usize, crate::layout::PaneId)> {
+ let (ws_idx, pane_id) = self.parse_pane_id(id)?;
+ (self.public_pane_id(ws_idx, pane_id).as_deref() == Some(id)).then_some((ws_idx, pane_id))
+ }
}