# scroll-on-clear

Source: https://libtmux.org/en/tmux/3.7c/catalog/options/scroll-on-clear/

> When the entire screen is cleared and this option is on, scroll the contents of the screen into history before clearing it.

option tmux3.7c

When the entire screen is cleared and this option is on, scroll the contents of the screen into history before clearing it.

* Scope

  window, pane

* Type

  Flag (on or off)

* Default

  `on`

* Set

  [`set-option`](https://libtmux.org/en/tmux/3.7c/manual/set-option/) `-w scroll-on-clear value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/3.7c/manual/show-options/) `-w scroll-on-clear`

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

When the entire screen is cleared and this option is on, scroll the contents of the screen into history before clearing it.

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

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/scroll-on-clear/) : present
* tmux 3.2a : not present

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

* Defined in

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

* 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-scroll-on-clear)

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

Library documentation that names this option.

* Rust

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

* Go

  [`tmux.GlobalWindowScope.SetScrollOnClear`](https://libtmux.org/en/go/latest/reference/tmux-globalwindowscope-setscrollonclear/), [`tmux.Pane.SetScrollOnClear`](https://libtmux.org/en/go/latest/reference/tmux-pane-setscrollonclear/), [`tmux.PaneOptionValues.ScrollOnClear`](https://libtmux.org/en/go/latest/reference/tmux-paneoptionvalues-scrollonclear/), [`tmux.Window.SetScrollOnClear`](https://libtmux.org/en/go/latest/reference/tmux-window-setscrollonclear/), [`tmux.WindowOptionValues.ScrollOnClear`](https://libtmux.org/en/go/latest/reference/tmux-windowoptionvalues-scrollonclear/)
