Buffer zoom

3 min read Original article ↗

Buffer zoom provides tmux users with OS-native scrollback, clipboard selection, and search.

It works by capturing the active tmux pane’s scrollback — wrapped lines joined, ANSI colors intact — then suspends the renderer, clears the primary screen, and paints the capture as a single full-terminal view. Press any key to dismiss and return to the main application. Unlike tmux copy-mode, which scrolls one pane while the rest of the layout remains visible, buffer zoom is a whole-terminal state transition.

Four tmux panes in a 2x2 grid; the upper-right pane shows a truncated ls -l /dev listing

Before — the upper-right pane shows a truncated ls -l /dev listing.

The same pane's scrollback painted full-screen via buffer zoom, revealing more of the ls -l /dev output

After — buffer zoom hides the UI and paints the full pane scrollback for OS-native interaction.

With buffer zoom active, users can:

  • Benefit from smooth, local-driven scroll gestures, even for remotely-connected tmux panes
  • Select and copy text with the same click-and-drag motion used for any other type of app
  • Search entire pane history with the usual key shortcuts (e.g. Cmd+F on macOS)

Additionally, if a pane is not already set to full screen width and contains wide columnar output (think e.g. kubectl get pods -o wide), buffer zoom is very handy for viewing that content in wide form without having to resize the pane. If you use this feature often, you can even configure a key mapping so buffer zoom activates with a single key press (e.g. with an unused function row key, if your OS and terminal emulator support it).

Open the Main Menu with Ctrl+G and press B, trigger the bufferZoom key binding, or click the button in the toolbar. The pane in focus at trigger time is the one whose scrollback is captured; wrapped lines are re-joined (tmux capture-pane -J) before display.

Press any key to dismise the buffer zoom view. While active, the outer terminal’s title reads [[ BUFFER ZOOM ACTIVE ]] · Press any key to dismiss to hint at this, and the cursor glows by cycling its color through grayscale shades via OSC 12 on terminals that honor the sequence. On dismissal the previous pane title and cursor color are restored.

For a softer switching effect, bufferZoomFade (default true) enables a quick fade-out of the alt screen and fade-in of the primary-screen capture. Terminals without truecolor support, and users who turn the key off, get an instant transition instead.

bufferZoomMaxLines (default 50000) caps how many scrollback lines are pulled from tmux. Set it to 0 for unlimited. The cap exists because very large captures can block the event loop while tmux serializes scrollback; keeping it bounded keeps the transition responsive on long-lived panes.

Screen captures powered by Honeyshots

Copyright © 2026 Aaron Campbell · Apache 2.0