# tmux.Pane.Move

- **Module:** tmux.Pane
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/pane_relocate.go#L80
- **Page:** https://libtmux.org/reference/go/tmux-pane-move/

```
tmux.Pane.Move(ctx: context.Context, request: MovePaneRequest) -> (Pane, error)
```

Move relocates the receiver pane into one exact destination with tmux's move-pane command. Unless Attach is set, the destination's active-pane selection remains unchanged; Attach is not a global client-focus guarantee. The returned [Pane] is freshly materialized in the destination SessionID and WindowID rather than by canonical ID-only refresh.

Removing the sole pane destroys the emptied source window and all of its
winlinks. Affected source sessions preserve their current selection unless
that window was current, in which case they select another. A session left
without windows is destroyed and detaches its clients.

If exact refresh fails after the command, Move returns a partial Pane with
the receiver PaneID and predicted destination context. Other failures return
zero. Transport errors are delivery-ambiguous and no rollback is attempted.
