AMythicDev / minus

An asynchronous, runtime data feedable terminal paging library for Rust
https://crates.io/crates/minus/
Apache License 2.0
317 stars 23 forks source link

Refactor all text handling functions #97

Closed AMythicDev closed 1 year ago

AMythicDev commented 1 year ago

The situation of text handling functions like append_str(), format_lines(), formatted_line() are no less than complete mess.

Most functions are tightly related to PagerState. They depend on each other like a web which makes them really difficult to understand for newcomers. Most of them are extremely long with not so good documentation. It becomes very easy to introduce bugs like #66. Most importantly it becomes very difficult to track where things might have gone wrong.

Through this, we intent to eliminate all of these issues once and for all.