# plan.planner.Planner.steps_bounded

- **Module:** plan.planner.Planner
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/plan/planner.rs#L160
- **Page:** https://libtmux.org/en/rs/latest/reference/plan-planner-planner-steps_bounded/

```
plan.planner.Planner.steps_bounded(self, plan: &Plan, boundaries: &BTreeSet<usize>) -> Vec<Step>
```

Group a plan, but never share an invocation across a boundary.

A boundary is an index after which the caller must do something itself
-- wait for a pane to be ready, run a hook -- so no group may span it.
Splitting only ever breaks a group into contiguous runs, so it changes
the number of invocations and not the result.

## Example

```rust
use std::collections::BTreeSet;
use libtmux::plan::{Plan, Planner, SendKeys};
use libtmux::PaneId;

let pane: PaneId = "%1".parse()?;
let mut plan = Plan::new();
plan.add(SendKeys::new(pane.clone()).text("one").enter());
plan.add(SendKeys::new(pane).text("two").enter());

assert_eq!(Planner::Folding.steps(&plan).len(), 1);
let after_first = BTreeSet::from([0]);
assert_eq!(Planner::Folding.steps_bounded(&plan, &after_first).len(), 2);
```
