charmbracelet / charmbracelet/bubbles

textarea: SetValue with input taller than viewport does not position cursor properly

Open
#231 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
8.9k
Forks
457
Avg merge
1d 18h
Merged PRs (30d)
5

Description

When I call `SetValue()` with a string that contains more lines than the height of the textarea, the cursor gets moved outside of view.

I then need to use `MoveToBegin()` to make it visible again.

I believe this is because `repositionView()` does not clamp the result to the viewport height.

Found while working on https://github.com/knz/bubbline/pull/9

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.