charmbracelet / bubbletea

A powerful little TUI framework 🏗

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow both native text selection and mouse wheel scrolling

rdnt opened this issue · comments

I tried using either WithMouseCellMotion or WithMouseAllMotion and they both seem to allow for scrolling a viewport with the mouse wheel but disable text selection/highlighting completely. Tried passing different flags to muesli's termenv to facilitate this, to no avail.

Would it be possible to allow both scrolling with mouse and text selection?

Hi! Unfortunately, when the mouse is enabled in a terminal native text selection is no longer possible. It’s a limitation of pretty much all terminals.

The plan is to implement text selection in Bubble Tea to overcome this limitation (similar to how it’s done in tmux) however it will take some time to implement it as it’s a rather large endeavor.

@meowgorithm I see. Thank you for considering adding it as a feature in bubbletea. Looking forward to it.