Skip to content
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

Better clifmt/text system #32

Open
6 tasks
nic-hartley opened this issue Jan 25, 2023 · 0 comments
Open
6 tasks

Better clifmt/text system #32

nic-hartley opened this issue Jan 25, 2023 · 0 comments
Labels
k: refactor reorganization of existing code without function changes p: tuig-iosys tuig-iosys crate s: rendering rendering subsystem (not user interface)
Milestone

Comments

@nic-hartley
Copy link
Owner

nic-hartley commented Jan 25, 2023

Text should be a blob of text with potentially several different formats within it, rather than a single string with one format. Then what's currently Text could probably be Segment. That would allow for convenience functions like checking equivalence, merging/minimizing, iterating over Cells, etc.

  • Rename Text to Segment, text1! to segment!, etc.
  • Add a new struct Text which contains a Vec<Segment>, and tweak text! to return that
  • Add iterator for Cells
  • Implement PartialEq to compare cell by cell
  • Tweak tests (e.g. text_input, but probably more) to simplify with the new text system
  • Editing formatting for ranges even if they don't line up with existing Segments
@nic-hartley nic-hartley added this to the v0.1 milestone Mar 27, 2023
@nic-hartley nic-hartley added p: tuig-iosys tuig-iosys crate s: rendering rendering subsystem (not user interface) k: refactor reorganization of existing code without function changes labels Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k: refactor reorganization of existing code without function changes p: tuig-iosys tuig-iosys crate s: rendering rendering subsystem (not user interface)
Projects
None yet
Development

No branches or pull requests

1 participant