You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible in termbox. Just because of abstractions used. Termbox doesn't preserve info about lines of text as it's just an array of 2d cells. And I believe similar libs have a similar problem, but maybe I'm wrong about that.
Sorry for the late answer, but let me get this right:
You want to be able to select a multi-line text but not the entire lines and you don't want the line breaks to be in the selection?
So this is your problem:
If you're still looking for a solution, here's something I hacked together:
Here is the source file in case you're interested: clipboard.go.txt
This basically consists of three things:
Any mouse press is recorded and added to a selection rectangle.
The selection rectangle is highlighted in the inverted style.
When the user presses the enter key, that region is copied to the clipboard.
With this technique, you still cannot intercept C-Ins (although you can intercept C-S-c. Also, keep in mind that what I'm doing here is not a real terminal selection but just a highlighted area.
When splitting long line into several lines (and filling content cell by cell) it is not copy-paste friendly
There is always new line copy-pasted
Is there a way to actually line wrap when needed?
If not, directions on how/where to implement it in termbox itself are welcomes
The text was updated successfully, but these errors were encountered: