Skip to content

v0.1.5

Compare
Choose a tag to compare
@rhysd rhysd released this 18 Jul 11:21
· 250 commits to main since this release
  • Improve performance to render a textarea widget. When number of lines increases, now rendering lines is about 2~8x faster according to our benchmark suites. See the commit for more details of the benchmark results. This was archived by managing a vertical scroll position by ourselves instead of scroll handling by Paragraph. Previously, a cost of rendering lines was O(n) where n was number of all lines. Now the cost is O(1).
  • Implement Clone for TextArea so that textarea instances can be copied easily. It is useful when you create multiple textarea instances with the same configuration. Create a first TextArea instance with configuring blocks and styles, then simply clone it.
  • Add arbitrary feature which is disabled by default. By enabling it, Input, Key and CursorMove can be randomly generated via arbitrary crate. This feature aims to be used by fuzzing tests.
  • Add many benchmark suites to track performance; insert/delete lines/characters, text search, moving a cursor.
  • Improve fuzzing tests to include rendering a textarea to a dummy terminal backend and moving a cursor randomly.
  • Refactor TextArea implementation. The implementation of text search was separated to src/search.rs. The implementation of highlighting was separated to src/highlight.rs. And the implementation of widget rendered by tui-rs was separated to src/widget.rs. These refactorings changed no public API.