Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

Text wrapping #12

Merged
merged 1 commit into from
Jun 30, 2020
Merged

Text wrapping #12

merged 1 commit into from
Jun 30, 2020

Conversation

jacobrosenthal
Copy link
Contributor

For #9

This scrolling issue around paragraph seems related fdehau/tui-rs#89
It put me onto just wrapping before giving text to tui list widget.

Allows to not use paragraph at all, and keep using list.

However.. hard to get access to terminal width, which could change dynamically, inside the rtt polling.

Could instead not do any formatting in channel and do it all in app.rs but then hard to do timestamps.

Even with something like this we still need some kind of vertical scrolling solution or were still just losing data above now
fdehau/tui-rs#61

Thoughts?

@Yatekii
Copy link
Member

Yatekii commented Jun 24, 2020

I will try this at home. Thanks for submitting this :)
Actually I prefer this to horizontal scrolling.

Imo the entire scrolling game is a pain anyways because how do you select text over more lines than the screen fits? I oftentime want to select text. That's why I want a dedicated UI client :) Also, maybe we should implement dumping into a file.

@jacobrosenthal
Copy link
Contributor Author

jacobrosenthal commented Jun 25, 2020

Added another take...This might be a decent first step while we help patch the upstream widgets. Though note pgup scrolling was broken

@jacobrosenthal
Copy link
Contributor Author

Theres probably performance concerns with long running processes, but they seem outweighed by not being able to see output of screen on short running processes which are far more common.

@Yatekii
Copy link
Member

Yatekii commented Jun 28, 2020

image

Sadly it still wraps after the timestamps :) I am pretty sure the wrap lib you introduced tries to wrap at spaces first :)

@jacobrosenthal
Copy link
Contributor Author

jacobrosenthal commented Jun 29, 2020

This is master branch behaviour. split_terminator destroys all new lines, so newlines inside debug statements are added as new timestamps.

@Yatekii
Copy link
Member

Yatekii commented Jun 30, 2020

I guess we can merge this now and fix the bad allocations and weird line break after the timestamps later on :)

@Yatekii Yatekii merged commit 23fc8f5 into probe-rs:master Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants