# renumber-windows

Source: https://libtmux.org/en/tmux/3.7c/catalog/options/renumber-windows/

> If on, when a window is closed in a session, automatically renumber the other windows in numerical order.

option tmux3.7c

If on, when a window is closed in a session, automatically renumber the other windows in numerical order.

* Scope

  session

* Type

  Flag (on or off)

* Default

  `off`

* Set

  [`set-option`](https://libtmux.org/en/tmux/3.7c/manual/set-option/) `renumber-windows value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/3.7c/manual/show-options/) `renumber-windows`

## Description[#](https://libtmux.org/en/tmux/3.7c/catalog/options/renumber-windows/#description)

If on, when a window is closed in a session, automatically renumber the other windows in numerical order. This respects the [`base-index`](https://libtmux.org/en/tmux/3.7c/catalog/options/base-index/) option if it has been set. If off, do not renumber the windows.

## Releases[#](https://libtmux.org/en/tmux/3.7c/catalog/options/renumber-windows/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/renumber-windows/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/options/renumber-windows/) : present

## Source[#](https://libtmux.org/en/tmux/3.7c/catalog/options/renumber-windows/#source)

* Defined in

  [`options-table.c:790`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L790)

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/3.7c/reference/c-variable-options_table/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.7c/manual/full/#options-renumber-windows)

## Used by[#](https://libtmux.org/en/tmux/3.7c/catalog/options/renumber-windows/#used-by)

Library documentation that names this option.

* Rust

  [`options.generated.RENUMBER_WINDOWS`](https://libtmux.org/en/rs/latest/reference/options-generated-renumber_windows/)

* Go

  [`tmux.GlobalSessionScope.SetRenumberWindows`](https://libtmux.org/en/go/latest/reference/tmux-globalsessionscope-setrenumberwindows/), [`tmux.Session.SetRenumberWindows`](https://libtmux.org/en/go/latest/reference/tmux-session-setrenumberwindows/), [`tmux.SessionOptionValues.RenumberWindows`](https://libtmux.org/en/go/latest/reference/tmux-sessionoptionvalues-renumberwindows/)
