# pane.Pane.zoom

- **Module:** pane
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/pane.ts#L472
- **Page:** https://libtmux.org/en/ts/latest/reference/pane-pane-zoom/

```
zoom(options?: CommandOptions): Promise<void>
```

Make this pane fill its window, whatever it was doing before.

Idempotent, and one tmux command: tmux offers only a toggle, so this asks
tmux to evaluate [`#{window_zoomed_flag}`](/en/tmux/latest/catalog/formats/window_zoomed_flag/) and toggle in the same
invocation rather than reading the flag here and racing the answer.
`window.zoomedFlag` reports the state a snapshot saw.

## Examples

```ts
await pane.zoom();
```

## Parameters

- `options?` (`CommandOptions`)

## tmux command

The tmux commands behind `zoom`.

- [`resize-pane`](/en/tmux/latest/manual/resize-pane/) (the window is not zoomed)
- [`if-shell`](/en/tmux/latest/manual/if-shell/)
- [`select-pane`](/en/tmux/latest/manual/select-pane/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_resize_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_resize_pane_entry/) (attribute)
- [`cmd_resize_pane_exec`](/en/tmux/latest/reference/c-function-cmd-resize-pane-c-cmd_resize_pane_exec/) (function)
- [`cmd_if_shell_entry`](/en/tmux/latest/reference/c-variable-cmd_if_shell_entry/) (attribute)
- [`cmd_if_shell_exec`](/en/tmux/latest/reference/c-function-cmd-if-shell-c-cmd_if_shell_exec/) (function)
- [`cmd_select_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_select_pane_entry/) (attribute)
- [`cmd_select_pane_exec`](/en/tmux/latest/reference/c-function-cmd-select-pane-c-cmd_select_pane_exec/) (function)
