# window_remove_pane

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L857
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-window_remove_pane/

```c
void window_remove_pane(struct window *w, struct window_pane *wp)
```

## Parameters

- `w` (`struct window *`)
- `wp` (`struct window_pane *`)

## Called by

- [`cmd_kill_pane_exec`](/en/tmux/latest/reference/c-function-cmd-kill-pane-c-cmd_kill_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-kill-pane.c#L59)
- [`cmd_split_window_exec`](/en/tmux/latest/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-split-window.c#L205)
- [`server_destroy_pane`](/en/tmux/latest/reference/c-function-server_destroy_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-fn.c#L382)
- [`server_kill_pane`](/en/tmux/latest/reference/c-function-server_kill_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-fn.c#L194)
- [`spawn_pane`](/en/tmux/latest/reference/c-function-spawn_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L398)

## Calls

- [`window_lost_pane`](/en/tmux/latest/reference/c-function-window_lost_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L859)
- [`window_pane_destroy`](/en/tmux/latest/reference/c-function-window-c-window_pane_destroy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L862)

## Referenced declarations

- [`window_pane.entry`](/en/tmux/latest/reference/c-struct-window_pane-entry/) (attribute)
- [`window.panes`](/en/tmux/latest/reference/c-struct-window-panes/) (attribute)
- [`window`](/en/tmux/latest/reference/c-struct-window/) (struct)
- [`window_pane`](/en/tmux/latest/reference/c-struct-window_pane/) (struct)
- [`window.z_index`](/en/tmux/latest/reference/c-struct-window-z_index/) (attribute)
- [`window_pane.zentry`](/en/tmux/latest/reference/c-struct-window_pane-zentry/) (attribute)
