]> Skullheadx's Git Forge - st.git/commit
st: alternative scrollback using ring buffer and view offset
authorMilos Nikic <nikic.milos@gmail.com>
Fri, 16 Jan 2026 00:08:59 +0000 (16:08 -0800)
committerSkullheadx <admonty1@protonmail.com>
Wed, 29 Apr 2026 08:22:40 +0000 (04:22 -0400)
commit282850e5e7a1cbbeb56a28f13e08f24868dc3035
tree8f340bcb0c6c6f11f050330bd845fcb55322da61
parent66b60431931ddad8da2ca8c9fa34e3ee783def27
st: alternative scrollback using ring buffer and view offset

Implement scrollback as a fixed-size ring buffer and render history
by offsetting the view instead of copying screen contents.
Implement reflow of history and screen content on resize if it is needed.

Tradeoffs / differences:
  - Scrollback is disabled on the alternate screen
  - Simpler model than the existing scrollback patch set
  - Mouse wheel scrolling enabled by default
  - Shift + page up/down and shift + end/home work as well.
  - When using vim, mouse movement will no longer move the cursor.
  - There can be visual artifacts if width of the window is shrank to the
    size smaller than the shell promp.
  - Mouse selection is persistent even if it goes off screen but it get
    reset on resize.
config.def.h
st.c
st.h
x.c