# libtmux::Window::select_last_pane

- **Module:** libtmux::Window
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/entities.hpp#L617
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-window-select_last_pane/

```
libtmux::Window::select_last_pane() -> expected< Pane, CommandFailure >
```

Go back to the pane that was selected before the current one, and answer with it.

Server state, like the window equivalent: nothing in a listing says which pane that was. A window holding one pane is refused rather than reselecting it, which is what tmux does.
