# LibTmux::Model::WindowRef.last-pane

- **Module:** LibTmux::Model
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Model.rakumod#L206
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-model-windowref-last-pane/

```
method last-pane(--> Result:D)
```

Select the previous active pane in this physical window.

Select the previous active pane in this physical window.

## 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)

## In other ports

Return to the pane that was active before

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.last_pane`](/en/py/latest/reference/libtmux-window-last_pane/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no equivalent on `Window` |
| Rust | [`window.Window.last_pane`](/en/rs/latest/reference/window-window-last_pane/) (method) |
| Go | [`tmux.Window.LastPane`](/en/go/latest/reference/tmux-window-lastpane/) (method) |
| Java | no equivalent on `Window` |
| C# | [`LibTmux.Window.SelectLastPaneAsync`](/en/csharp/latest/reference/libtmux-window-selectlastpaneasync/) (method) |
| C++ | [`libtmux::Window::select_last_pane`](/en/cxx/latest/reference/libtmux-window-select_last_pane/) (method) |
| Swift | [`Server.selectLastPane(in:)`](/en/swift/latest/reference/server-selectlastpane(in-)/) (method) |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
