Commit graph

14 commits

Author SHA1 Message Date
Andrew Wheeler(Genusis)
f2a60a8dcc
Rework add_span (#25)
* Rework Ranges to split and change or overwrite based on old ranges to new range

* set array size to 3 instead of 5. added some comments

* Avoid adding ranges that the start and end == each other

* actually remove the start != end requirement since get_span doesnt care and would work for single characters.

* Add 1 to forward map so it cant overlap ranges like 11..11

* optimize the span lookup so if it is outside the search parameters it doesnt keep looping. update get span to iterate normally since there should be no duplicates. Maybe optimize this to a btree now instead?

* make the range changes for front to end have the end -1 so as to not overlap since get span is <=

* Readded block for ranges like 1..1
Moved rework ranges into the first loop.
Removed the -1 and +1 from the range clips.
2022-10-29 17:56:14 -06:00
Jeremy Soller
cce821e99f
Adjust attribute spans when buffer lines change 2022-10-27 14:51:46 -06:00
Jeremy Soller
e2b9aa77b9
Iterate attr spans in reverse for efficiency 2022-10-27 13:50:14 -06:00
Jeremy Soller
e4c8d4ba6b
Make attribute spans use ranges and update docs 2022-10-27 09:56:53 -06:00
Jeremy Soller
3ece9236b3
Use Color in more places 2022-10-27 09:07:47 -06:00
Jeremy Soller
40175aac10
Always match emoji regardless of attributes 2022-10-27 08:25:30 -06:00
Jeremy Soller
f85223b376 Only reset lines where highlight changes 2022-10-26 21:27:29 -06:00
Jeremy Soller
ea64291abb
Make it possible to set attributes per glyph 2022-10-26 15:16:06 -06:00
Jeremy Soller
4798c7ee1a
Add initial rich text example 2022-10-26 14:16:48 -06:00
Jeremy Soller
119a570ee9
Cache font matches, use usize for line index, use font system for swash 2022-10-26 12:23:03 -06:00
Jeremy Soller
525c4efaa5
Add ability to set global buffer attributes 2022-10-25 16:29:33 -06:00
Jeremy Soller
085231c153
Move font matching to Attrs 2022-10-25 15:51:28 -06:00
Jeremy Soller
a3ccbd0481
Add spdx identifiers 2022-10-25 14:42:26 -06:00
Jeremy Soller
84f4381cdf
Add text attributes 2022-10-25 14:14:23 -06:00