Commit graph

230 commits

Author SHA1 Message Date
Jeremy Soller
6660a1d95b
0.5.2 2022-12-08 11:33:53 -07:00
Jeremy Soller
dd94bc634b
Do not wrap empty lines 2022-12-08 11:33:36 -07:00
Jeremy Soller
3d60d55309
Add comment for last change 2022-12-08 10:35:13 -07:00
Jeremy Soller
69e41a558c
0.5.1 2022-12-08 10:32:10 -07:00
Jeremy Soller
a30576e1eb
Skip blank words at start of line 2022-12-08 10:31:44 -07:00
Jeremy Soller
d22c0f43d4
Update to latest libcosmic 2022-12-06 08:49:32 -07:00
Jeremy Soller
05d97f0f3a
Make noto color emoji have a higher preference for fallback 2022-12-02 08:41:38 -07:00
Hojjat
cd64388451 Added BiDi example to demonstrate reordering works
and disabled `wrap simple` since it's not working properly.
2022-12-02 08:30:16 -07:00
Hojjat
c344eec936 This fixes the bidi layout issue.
Needs more testing and cleaning up the previous algorithm.
2022-12-02 08:30:16 -07:00
Jeremy Soller
2342bf0eae
Add more vi commands 2022-11-21 15:49:12 -07:00
Jasper Bekkers
e6df88f698
Add cargo-deny to the CI of this crate (#45) 2022-11-21 04:40:06 -07:00
Jasper Bekkers
6249b0e037
🍮 Add custom font support (#43)
* 🍮 Add custom font support

* Revert incorrect change
2022-11-21 04:36:18 -07:00
Jeremy Soller
425f741982
0.5.0 2022-11-15 12:27:23 -07:00
Jeremy Soller
ee54e7626b
Vi-style editor and other editor improvements (#40)
* WIP VI wrapper for editor

* WIP: block cursor

* Create Edit trait, run CI on all feature options

* Add prints describing build steps to ci.sh

* Custom rendering for Vi editor

* Clippy fixes

* More clippy fixes

* Show clippy results in CI

* Fix for Redox

* Fix clippy lint

* Add vi feature to enable vi-style editor

* Add escape to libcosmic text box
2022-11-15 12:26:59 -07:00
Andrew Wheeler(Genusis)
271ca5cf7a
Converted attr range to use RangeMap BTree (#41)
* Converted attr range to use RangeMap BTree

* Change get_span() to use First index instead of range.

* update doc comment
2022-11-14 11:05:34 -07:00
Hojjat
b253800383
Add Padding to the TextBox (#36)
* WIP: initial text-margin support

* Fix the selection issue when clicking the margins

* Move the margin size into the main

* using padding, consistent with iced text_input

* Added top and bottom margin

* bugfix: selection starting from the top margin works

* bugfix: left half of first glyph was being ignored
2022-11-10 11:55:12 -07:00
Jeremy Soller
bbe7d77b7b
Improvements to syntax editor, integrate with libcosmic editor 2022-11-09 10:44:51 -07:00
Jeremy Soller
1663bfc96c
Add SyntaxEditor abstraction using optional synect feature 2022-11-09 10:09:42 -07:00
Jeremy Soller
ecf61a93b1
Update to use cosmic::theme::Theme 2022-11-09 08:03:13 -07:00
Jeremy Soller
5cca5dd058
Add screenshots 2022-11-09 07:22:20 -07:00
Jeremy Soller
f0b6afdf69
0.4.1 2022-11-08 13:25:21 -07:00
Jeremy Soller
268805ba0c no_std support 2022-11-08 13:24:14 -07:00
Jeremy Soller
e95671f68f
Add comment 2022-11-08 13:22:39 -07:00
Jeremy Soller
658a037ca7
Add functions for copying and deleting selection 2022-11-08 10:18:19 -07:00
Hojjat
83307e7969 Switch to peekable to avoid looping the runs again 2022-11-06 11:09:17 -07:00
Hojjat
c1c2248572 bugfix: text selection starting from the bottom 2022-11-06 11:09:17 -07:00
grovesNL
2ceee35011 Fix typo in "performance" 2022-11-05 09:15:24 -06:00
Hugo Osvaldo Barrera
ae25b6c1b9 Add links to repo and docs in Cargo.toml
This will add a link to the repository in docs.rs, and both links to
crates.io.
2022-11-04 12:46:57 -06:00
Jeremy Soller
093a6081bc
0.4.0 2022-11-04 10:39:00 -06:00
Jeremy Soller
ebd7c4058b
Fix editor-test compilation 2022-11-04 10:38:47 -06:00
Ian Douglas Scott
0d3fb1dd9d Use ouroboros in FontSystem to avoid lifetime bound
Perhaps not quite what ouroboros is expected to be used for, but it's
not too bad, and avoiding the lifetime bound can be a huge help.
2022-11-04 10:37:32 -06:00
Jeremy Soller
ac354c3a2a
Remove AttrsList lifetime bound 2022-11-04 09:44:54 -06:00
tarkah
06cb0c2637 Refactor to text::draw_pixel helper 2022-11-04 09:11:57 -06:00
tarkah
9e389b629b Resolve size using limits 2022-11-01 16:06:50 -06:00
Jeremy Soller
8efebfcd07
iced TextBox improvements 2022-11-01 09:09:36 -06:00
Jeremy Soller
9a6a01a672
Add script to build everything and run all tests 2022-11-01 08:38:44 -06:00
Jeremy Soller
d49e8881fd
Use image renderer for iced text widget 2022-10-31 12:04:33 -06:00
Jeremy Soller
b0ec548a5e
0.3.0 2022-10-31 11:40:01 -06:00
Jeremy Soller
a13fd9c591
Improve docs 2022-10-31 11:36:54 -06:00
Jeremy Soller
7d26e332f0
Make cursor_moved private 2022-10-31 11:26:05 -06:00
Jeremy Soller
92cad6fe13
Decouple editing from buffer 2022-10-31 11:24:36 -06:00
Jeremy Soller
26c83be35a
Combine spans in add_span if possible 2022-10-31 10:25:08 -06:00
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
tarkah
9e9a14f323 Update text color on theme change 2022-10-29 17:31:50 -06:00
tarkah
972a3c722a Set attrs on launch 2022-10-29 17:31:50 -06:00
Jeremy Soller
a1f767505e Clarify off by one issue 2022-10-27 20:31:20 -06:00
Jeremy Soller
c247bbdad2 Move cache to text box state 2022-10-27 20:31:05 -06:00
Jeremy Soller
4e2e41470b
0.2.2 2022-10-27 18:29:41 -06:00
Jeremy Soller
bd327e4a21
Add text color to TextBox, fix resizing 2022-10-27 18:28:52 -06:00
Jeremy Soller
091b9d2840
Text widget get color from theme 2022-10-27 18:20:29 -06:00