# tmux_pane:break/4

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_pane.erl#L211
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_pane-break-4/

```
break(Pane, SourceLink, Session, Options)
-spec break(tmux_model:pane(),
            tmux_model:window_link(),
            tmux_model:session(),
            break_options()) ->
               {ok, tmux_operation:completed()} |
               {error, map()}.
```

Break a physical pane through its explicit source membership into a destination session/index. Source, link and session must have the same registered owner. The source link's expected window and the pane's observed parent are checked before dispatch. The source selector also includes the stable pane ID, never its positional index. Preflight and action are not atomic.

With multiple panes, tmux creates a new physical window. With only one pane,
it moves the selected source membership, preserving the existing window and
its other links. Moving the final membership out can remove the source session.
Pane IDs and processes remain; indexes and option inheritance can change.
name is a literal UTF-8 argument, subject to native name cleaning.
An occupied destination index is refused. detach defaults true; false selects
the destination membership. Session groups retain native synchronization.

Returns the command result consistently for both cases. Use `get/2` or
`tmux_window_link:get/3` for fresh observations. Even an eventual native error
can unzoom a window; this is not a transaction and is never retried.

## Parameters

- `Pane` (`tmux_model:pane()`)
- `SourceLink` (`tmux_model:window_link()`)
- `Session` (`tmux_model:session()`)
- `Options` (`break_options()`)

## tmux command

The tmux commands behind `break/4`.

- [`break-pane`](/en/tmux/latest/manual/break-pane/)
- [`display-message`](/en/tmux/latest/manual/display-message/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_break_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_break_pane_entry/) (attribute)
- [`cmd_break_pane_exec`](/en/tmux/latest/reference/c-function-cmd-break-pane-c-cmd_break_pane_exec/) (function)
- [`cmd_display_message_entry`](/en/tmux/latest/reference/c-variable-cmd_display_message_entry/) (attribute)
- [`cmd_display_message_exec`](/en/tmux/latest/reference/c-function-cmd-display-message-c-cmd_display_message_exec/) (function)

## Guides

Pages that discuss `break/4`.

- [Native API documentation](/en/erlang/latest/guides/api-documentation/)
- [Isolate and rejoin a running pane](/en/erlang/latest/guides/panes/)

## In other ports

Move a pane out into a window of its own

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.break_pane`](/en/py/latest/reference/libtmux-pane-break_pane/) (method) |
| Ruby | [`LibTmux::Pane#break_out`](/en/ruby/latest/reference/libtmux-pane-break_out/) (method) |
| Lua | [`libtmux.Pane:break_out`](/en/lua/latest/reference/libtmux-pane-break_out/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.breakOut`](/en/ts/latest/reference/pane-pane-breakout/) (method) |
| Rust | [`pane.Pane.break_out`](/en/rs/latest/reference/pane-pane-break_out/) (method) |
| Go | [`tmux.Pane.BreakPane`](/en/go/latest/reference/tmux-pane-breakpane/) (method) |
| Java | [`io.github.libtmux.Pane.breakOut`](/en/java/latest/reference/io-github-libtmux-pane-pane-breakout/) (method) |
| C# | [`LibTmux.Pane.BreakAsync`](/en/csharp/latest/reference/libtmux-pane-breakasync/) (method) |
| C++ | [`libtmux::Pane::break_out`](/en/cxx/latest/reference/libtmux-pane-break_out/) (method) |
| Swift | [`Server.breakPane(_:from:named:)`](/en/swift/latest/reference/server-breakpane(_-from-named-)/) (method) |
| OCaml | [`Libtmux_unix.Client.break_pane`](/en/ocaml/latest/reference/libtmux_unix-client-break_pane/) (function) |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

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