-
Notifications
You must be signed in to change notification settings - Fork 331
Open
Description
Describe the bug
Scrolling a Viewport
up or down with SoftWrap
enabled feels broken.
As an example, when a single line has been wrapped to span six logical / visual lines, the user must press j/↓
five times in order to achieve any scrolling of the viewport.
Setup
macOS, WezTerm, v2
dependencies:
github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1
github.com/charmbracelet/bubbletea/v2 v2.0.0-beta1
To Reproduce
Steps to reproduce the behavior:
- Create a
Viewport
with content that has lines exceeding the width of the viewport - Turn
SoftWrap
on - Scroll vertically past soft linebreaks -- multiple key presses are required for a view update
Source Code
See this gist for a quick repro.
Pressing w
toggles SoftWrap
on and off.
Expected behavior
I would expect the viewport scrolling to happen by logical lines. That is, pressing j
once should immediately scroll the topmost (wrapped) line of content out of view.
Screenshots
viewport.mp4
Metadata
Metadata
Assignees
Labels
No labels