charmbracelet / charmbracelet/bubbletea

Seems a type View Update Bug

Open
#1,784 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
44.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I found that if my content for NewView is not changed under release mode, the updating of the cursor will not work;but if i use vscode debugger to run it, it will work!

**Setup**
Please complete the following information along with version numbers, if applicable.
- OS [Fedora44]
- Shell [zsh]
- Terminal Emulator [kitty, vscode terminal]
- Terminal Multiplexer [tmux](i had it but i did not use it )

**To Reproduce**
Steps to reproduce the behavior:
just create a text in model but do not change it, and update Cursor.X in model in Update and View method, and if you press the key to move Cursor's X coordinate you will find that the Cursor did not move

**Source Code**

**Expected behavior**
the cursor should move when we make a View with cursor coordinate though we did not change the content for the View

**Screenshots**
Add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
is that a bug or just a feature, i did not find some docs which explain it and i am sorry if i ignored

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by building the described minimal NewView reproduction in release mode, compare it with a debugger run, and trace the Update and View paths while changing only Cursor.X. Done means the cursor moves when its coordinate changes even when the view content is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.