Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
plutov opened this issue Jul 24, 2024 · 1 comment

Comments

@plutov
Copy link

plutov commented Jul 24, 2024

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.

@plutov plutov changed the title textarea occasionally hangs on View textarea: occasionally hangs on View Jul 24, 2024
@plutov plutov changed the title textarea: occasionally hangs on View textarea: sometimes freezes when calling textarea.View() Jul 24, 2024
@plutov plutov changed the title textarea: sometimes freezes when calling textarea.View() textarea: sometimes freezes when calling textarea.SetValue() and then textarea.View() Jul 24, 2024
@plutov
Copy link
Author

plutov commented Jul 25, 2024

I resolved this issue by modifying the styles. By default it uses lipgloss.AdaptiveColor which causes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant