Comments (7)
You need to wrap your content at the given maximum width.
from bubbletea.
#43 looked at this issue and added wrapping using github.com/muesli/reflow/wordwrap package yet it still has that weird despairing bug although text appears when i add long enough string so wordwrap triggers and then all seems to stay on screen from that point on
from bubbletea.
#43 looked at this issue and added wrapping using github.com/muesli/reflow/wordwrap package yet it still has that weird despairing bug although text appears when i add long enough string so wordwrap triggers and then all seems to stay on screen from that point on
I'm experiencing this exact bug. I thought about calling
import (
"github.com/inancgumus/screen"
)
func clearScreen() {
screen.Clear()
screen.MoveTopLeft()
}
in the beginning of View()
but https://pkg.go.dev/github.com/charmbracelet/bubbletea#ClearScreen states: "Note that it should never be necessary to call ClearScreen() for regular redraws." So I think there must be a better way to fix this. Did you figure something out by now?
from bubbletea.
Hi! @Horryportier or @m1cm1c: can you produce a minimal example, with reflow
, that reproduces the issue? That will help us solve this quickly and effectively. If the bug you're seeing is in reflow
itself, let's close this issue and open an issue there.
from bubbletea.
I don't thing reflowis the issue, bug was present before I've added that library. Wordwrap solved issue partially because it still would occurred for strings shorter that wrap threshold but it would fix itself after wordwrap was triggered
As for reproducing the bug it would hard because it only occurs for me when dealing with text data from serial port. So there might be issue with data send from esp32 having some weird glyphs. Although arduino ide 2 works just fine.
from bubbletea.
@meowgorithm Here is a fairly small program that reliably reproduces the described behavior: https://gist.github.com/m1cm1c/0248ef748db56d0cc1f7e4398a3f2fad
I ran it via: go run .
After making the window wider (looks fine):
After making the window narrower again, "(esc to quit)" repeats:
OS: Manjaro
Go version: 1.21.7
Architecture: AMD64
Terminal: xfce4-terminal (version 1.1.3)
Shell: GNU bash (version 5.2.26(1))
from bubbletea.
that looks like different bug than mine mine makes first few characters disappear corresponding to amount of additional text
from bubbletea.
Related Issues (20)
- First line not rendering until event happens HOT 3
- Part of the screen is not rendering when the view is exactly the size of the screen HOT 3
- Proposal: Model v2, program context
- Exiting fullscreen glitch when also removing a line in output HOT 2
- Proposal: use x/input to handle input events
- `tea.unknownCSISequenceMsg: unknown message type` panics HOT 3
- The visible area in viewport may seem incorrect when content exceed the viewport.Width HOT 10
- Flickering on Windows when using bubbletea >=0.26.0 HOT 2
- Unmanaged Output Truncation (e.g. `tea.Println`) HOT 1
- Show example GIFs on all examples HOT 1
- The input isn't verified before using epoll on it HOT 3
- go version in go.mod is outdated HOT 2
- does Update() get called even when there are no keys being pressed?
- Can't write japanese characters in inputfield HOT 2
- Exit with error message to stderr and non-zero status code
- Async Clipboard
- Automatic command chaining: Cmd -> Cmd -> Msg HOT 1
- Allow WindowSizeMsg to be sent on sub-model Init HOT 5
- Progress bar behaving strangely
- Any support for charts?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bubbletea.