# libtmux::Server::wait_for_text

- **Module:** libtmux::Server
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/server.hpp#L420
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-server-wait_for_text/

```
libtmux::Server::wait_for_text(target: std::string_view, wanted: std::string_view, options: const WaitOptions & = {}) -> expected< WaitResult, CommandFailure >
```

Wait until the pane `target` names produces `wanted`.

For a caller holding a target rather than a `Pane` — `Pane::wait_for_text` is the same wait without the lookup. One deadline covers both: a target that will not resolve cannot spend the whole budget and leave nothing for waiting, and `WaitPath::pane_lookup` says that is what happened.
