-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add support to set text wrapping #13
base: main
Are you sure you want to change the base?
Conversation
I almost decided to just have a |
Thank you for trying to make a patch. However this doesn't work because tui-textarea is managing scroll position by itself and it assumes height is equal to number of lines. I think you would find it if you run |
I actually just came across this in my own program using my patch. Came back here to comment about it and saw you responded today. Sorry I didn't catch it sooner; I'll look into the scrolling part to understand it and fix the issue. |
I wonder if you'd have any thoughts to add at ratatui/ratatui#174 regarding scrolling from the things you've learnt from this issue? |
Hey @brooksvb, are you still working on this? I'd be more than happy to help bringing this over the finish line 🙂 |
I wanted to finish it but it continued to balloon in complexity and I ran out of steam while the rest of my life got quite complicated and hectic for a while. 😅 You're more than welcome to take over to get it the rest of the way! |
Thanks for your reply! It would be very helpful to get a jump start 🙂. Could you write up a short summary of the current state? Like, things that need to be done, nice-to-haves, known issues etc. |
This would be great to have |
b0cb782
to
18d709f
Compare
f429442
to
b2cee69
Compare
@erak sorry for the late response. It's been hectic. I would suggest reading the code I've written to understand the current state. I tried to leave good comments for the confusing parts, and a decent commit history for "blame" investigation. This comment #5 (comment) also contains some good background for the task. It seems @rhysd is considering working on this feature at some point and had some ideas, so maybe get input from them if you're planning to work on this. |
2202e41
to
39075bb
Compare
Closes issue #5
Pretty straightforward, just adding a way to set text wrapping on the internal
Paragraph
widget created when rendering theTextArea
.I tested with the examples, and tested with the search function using the editor example. Text wrapping worked as expected without any apparent interference with the search functionality. Passes tests and linting checks.
Feedback is welcome.