Open MontyBlenheim opened 3 years ago
Using wrapping violates the main requirement to use the clipper which is that each entry should have the same height.
If you need to use both, you would probably need to precompute and store the wrapping points for a given width (similarly to how eg the Log demo stores carriage returns points) and use that to be able to “seek” to a given wrapped line.
That's fine for the case of text, I could manually split that into multiple lines. However I was considering wrapping each line in a Selectable. I'm assuming I wouldn't be able to have a 3 line high selectable? So one log entry would have 3 lines, and 3 separate selectables, if I went this route?
You can perfectly pass a multi-line string to Selectable()
.
One issue is that Selectable() currently expect a zero-terminated string however, so depending on the nature of your data source you may need to zero-terminate it (possibly temporarily).
We're currently working toward getting #3038 merged in master (waiting on Rust user to work with our new bindings generator) and when that is done you will not need to zero-terminate selectables.
I'm trying to pass a single line string to Selectable and use PushTextWrapPos. In my experience this doesn't work. I assume it's just not compatible and again I'd have to manually calculate where to split the string?
Thanks for all your help so far :)
My Issue/Question: I have a log window inspired by the demo one, but I wanted to enable word wrap. However, I found that with a window small enough to split one text entry in between scroll movements, the scroll will jitter up and down instead of scrolling to the bottom. I've attached a video in which I'm scrolling down repeatedly.
Below is some code that should reproduce this. I've provided some hard coded logs which just happen to be the log lines that made this issue appear for me. I've included the metrics information for both the Log2 window and the child window, which should give you information about the size of this window. This should be enough to reproduce this issue.
Thanks for any help!