# window_remove_pane

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L709
- **Page:** https://libtmux.org/en/tmux/3.2a/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/3.2a/reference/c-function-cmd-kill-pane-c-cmd_kill_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-kill-pane.c#L59)
- [`cmd_split_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-split-window.c#L166)
- [`server_destroy_pane`](/en/tmux/3.2a/reference/c-function-server_destroy_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L378)
- [`server_kill_pane`](/en/tmux/3.2a/reference/c-function-server_kill_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L190)
- [`spawn_pane`](/en/tmux/3.2a/reference/c-function-spawn_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/spawn.c#L369)

## Calls

- [`window_lost_pane`](/en/tmux/3.2a/reference/c-function-window_lost_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L711)
- [`window_pane_destroy`](/en/tmux/3.2a/reference/c-function-window-c-window_pane_destroy/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L714)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`window_pane.entry`](/en/tmux/3.2a/reference/c-struct-window_pane-entry/) (attribute)
- [`window.panes`](/en/tmux/3.2a/reference/c-struct-window-panes/) (attribute)
- [`window`](/en/tmux/3.2a/reference/c-struct-window/) (struct)
- [`window_pane`](/en/tmux/3.2a/reference/c-struct-window_pane/) (struct)
