# libtmux:last-pane

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/selection.lisp#L47
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-last-pane/

```
(last-pane client window &key (observe t) cancel-token timeout output-limit)
```

Select WINDOW's last active pane; return an outcome with that observed pane.
OBSERVE may omit follow-up acquisition. Tmux reports an error when no last
pane exists. Signals STALE-TARGET or an operational condition. Earlier
captures retain their original selection.

## Parameters

- `client`
- `window`
- `observe?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `last-pane`.

- [`last-pane`](/en/tmux/latest/manual/last-pane/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_last_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_last_pane_entry/) (attribute)
- [`cmd_select_pane_exec`](/en/tmux/latest/reference/c-function-cmd-select-pane-c-cmd_select_pane_exec/) (function)

## Guides

Pages that discuss `last-pane`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
