# tmux.Pane.Resize

- **Module:** tmux.Pane
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/pane_geometry.go#L86
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-pane-resize/

```
tmux.Pane.Resize(ctx: context.Context, request: ResizePaneRequest) -> (Pane, error)
```

Resize runs tmux resize-pane against the receiver's exact linked session-window-pane target, then refreshes by PaneID. The returned canonical [Pane] may therefore carry a different linked-session or winlink context. If the resize is accepted but refresh fails, Resize returns the original receiver with that error.

Invalid requests fail before execution. A completed command produces a
redacted [CommandError] only for stderr; nonzero exits without stderr are
followed by refresh. Transport errors return zero and are delivery-ambiguous.
