# tmux.Window.SplitPane

- **Module:** tmux.Window
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/pane_create.go#L300
- **Page:** https://libtmux.org/reference/go/tmux-window-splitpane/

```
tmux.Window.SplitPane(ctx: context.Context, request: SplitPaneRequest) -> (Pane, error)
```

SplitPane creates a tiled pane in the receiver's exact winlink. Attach makes the new pane active in that session and winlink; it is not a global client-focus guarantee. The returned [Pane] is freshly materialized in the receiver SessionID and WindowID rather than by canonical ID-only refresh.

If tmux reports a [PaneID] before a transport or refresh failure, the partial
result also contains the receiver SessionID and WindowID. Other failures
return zero; creation is not rolled back.
