spec: horizontal scrolling per terminal pane (#9828)#10231
spec: horizontal scrolling per terminal pane (#9828)#10231lonexreb wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
There was a problem hiding this comment.
Overview
This spec defines per-pane horizontal scrolling for terminal panes when line-wrap is disabled, with trackpad, Shift-wheel, and scrollbar controls.
Concerns
- The behavior contract does not define how horizontal offsets are clamped or reset when the visible long-line set changes, the pane resizes, line-wrap is toggled, or vertical scroll moves to shorter content.
- The snap-on-new-output behavior is ambiguous for terminal output patterns like partial line updates, prompt redraws, tailing logs, and alternate-screen/TUI updates.
- The new snap setting needs a small implementation/discovery note so implementers know where it is exposed and persisted.
Found: 0 critical, 2 important, 1 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| - B1. Horizontal scrolling is gated on: | ||
| - The pane's `terminal.line_wrap = false` setting (existing). | ||
| - At least one visible row exceeding pane width. | ||
| When either condition is false, the pane behaves as today (no | ||
| horizontal scroll, no scrollbar). |
There was a problem hiding this comment.
h_offset is clamped or reset when the visible long-line set changes, the pane resizes, line-wrap toggles, or vertical scrolling moves to shorter content; otherwise implementations can show blank shifted columns or stale scrollbars.
| - B6. Auto-scroll on new output: by default the pane snaps back | ||
| to horizontal offset 0 when new output arrives at the bottom | ||
| (new prompt, new line). User-controlled snap behavior can be | ||
| disabled via `terminal.h_scroll_snap_on_new_output` (default | ||
| `true`). |
There was a problem hiding this comment.
new output arrives at the bottom is too broad to implement consistently.
| - B6. Auto-scroll on new output: by default the pane snaps back | ||
| to horizontal offset 0 when new output arrives at the bottom | ||
| (new prompt, new line). User-controlled snap behavior can be | ||
| disabled via `terminal.h_scroll_snap_on_new_output` (default |
There was a problem hiding this comment.
💡 [SUGGESTION] Add where terminal.h_scroll_snap_on_new_output is exposed and persisted, plus a test or acceptance criterion for disabling it.
Spec for #9828. Per-pane horizontal scroll when line-wrap is off and content exceeds pane width. Trackpad swipe, Shift-wheel, and a bottom scrollbar all drive it. Snaps to offset 0 on new output by default. Selection copies logical text.
Closes (spec-only) #9828.