charmbracelet / charmbracelet/bubbles

textarea: sometimes freezes when calling textarea.SetValue() and then textarea.View()

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

Description

My Update func shows or hides the textarea depending on app state. Sometimes it works well, but sometimes it hangs on View. Replacing `textarea.View` with some simple string works well, so the state is correct.

- OS: macOS
- Terminal: warp.dev

1. Install and run https://github.com/plutov/ultrafocus
2. Select "blacklist" from the menu

**Source Code**
Model Update: https://github.com/plutov/ultrafocus/blob/main/cli/model.go#L63
textarea.View: https://github.com/plutov/ultrafocus/blob/main/cli/view.go#L40

**Expected behavior**
Textarea shows/hides properly based on app state.

p.s.
When I remove SetValue() call everything works fine with empty textarea.

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.