Overview
Scrolling actions allow you to navigate through terminal output and scrollback history. WezTerm provides fine-grained control over scrolling, including page-based scrolling, line-by-line navigation, and semantic navigation by shell prompts.Basic Scrolling
ScrollByPage
Scroll by full or partial pages:number
required
Number of pages to scroll. Negative values scroll up, positive scroll down. Supports fractional values for partial page scrolling (e.g.,
0.5 for half a page)Fractional page scrolling is supported since version 20220319-142410-0fcdea07
ScrollByLine
Scroll by individual lines:integer
required
Number of lines to scroll. Negative values scroll up, positive scroll down
ScrollByCurrentEventWheelDelta
Scroll based on the current mouse wheel event:Jump to Position
ScrollToTop
Scroll to the top of the scrollback:ScrollToBottom
Scroll to the bottom (current output):Semantic Scrolling
ScrollToPrompt
Navigate to shell prompts in the scrollback:integer
required
Number of prompts to jump. Negative values jump to previous prompts, positive to next prompts
This feature requires semantic prompt tracking to be enabled. Your shell must emit OSC 133 sequences for prompt marking. WezTerm’s built-in shell integration provides this automatically.
Managing Scrollback
ClearScrollback
Clear the scrollback buffer:ScrollbackEraseMode
required
What to clear:
'ScrollbackOnly'- Clear only the scrollback buffer, preserving the viewport (default)'ScrollbackAndViewport'- Clear both scrollback and viewport (likeclearcommand)
Copy Mode Scrolling
When in copy mode, you can use dedicated copy mode scrolling actions:Complete Example
Configuration Options
Related configuration options that affect scrolling behavior:integer
default:"3500"
Number of lines of scrollback to keep in memory
boolean
default:"false"
Whether to show a scrollbar
string
default:"'2cell'"
Minimum height of the scrollbar thumb
Related Actions
- Copy/Paste Actions - Copy text from scrollback
- Search Actions - Search through scrollback history