Commit graph

31 commits

Author SHA1 Message Date
Jeremy Soller
0cfd9b64ef
Add line ending abstraction (#250)
* Add line ending abstraction

* Make Buffer::set_text use LineIter

* Add ctrl+s for saving to editor
2024-04-30 12:12:25 -06:00
Christopher Serr
8582173128 Fix no_std build
This fixes the `no_std` build and also makes sure it's tested properly
in the CI workflow.
2024-02-12 10:37:49 -07:00
Jeremy Soller
1eb3233373
Add shape-run-cache feature, that can significantly improve shaping performance 2024-02-08 11:12:41 -07:00
Jeremy Soller
d0b4b4635e Refactor of scroll and shaping
- Scroll is identified by line index and layout index, instead of just
  layout index
- Shaping has the option to prune, where caches outside of the scroll
  view are cleared
- Syntax editor no longer requires layout of all lines, only of lines
  inside scroll
- BufferLine has a metadata field that can be used by other abstractions
  to know when text was changed
2024-01-17 13:31:03 -07:00
Jeremy Soller
018a2e9d2a Move cursor motions to new Motion enum, move handling to Buffer 2024-01-17 13:31:03 -07:00
David Stern
73acfb0962 Cache rustybuzz shape plans. 2023-12-18 18:19:27 -05:00
Jeremy Soller
19ae07bd3b
Fix some clippy lints 2023-11-15 09:21:13 -07:00
grovesNL
c4d107563a Require either std or no_std to be specified 2023-08-09 11:44:20 -02:30
John Nunley
440d24ffa0
Add more Debug implementations
I generally like to implement Debug on these kind of types.
2023-07-07 21:44:21 -07:00
tigregalis
e298259dd5 introduce BidiParagraphs iterator 2023-06-09 11:22:52 +08:00
Héctor Ramón Jiménez
0f055c0a13
Replace skip_shaping boolean with Shaping enum 2023-04-21 20:24:44 +02:00
Héctor Ramón Jiménez
ad111a1df1
Add skip_shaping flag to avoid expensive shaping when not needed 2023-04-19 00:24:43 +02:00
Edgar Geier
41468c17a2
Fix doctest 2023-03-12 10:39:58 +01:00
Edgar Geier
4e93853765
Remove lifetime from SwashCache 2023-03-01 22:41:59 +01:00
Héctor Ramón Jiménez
4320ae6329
Use f32 instead of i32 for lengths
This allows users to use logical coordinates instead of physical ones.
2023-02-28 03:39:31 +01:00
grovesNL
a3e035881b Fill out some more docs 2023-01-29 22:29:17 -03:30
Jeremy Soller
8cc988d374 Run cargo fmt 2023-01-04 20:03:03 -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
Jeremy Soller
1663bfc96c
Add SyntaxEditor abstraction using optional synect feature 2022-11-09 10:09:42 -07:00
Jeremy Soller
268805ba0c no_std support 2022-11-08 13:24:14 -07:00
grovesNL
2ceee35011 Fix typo in "performance" 2022-11-05 09:15:24 -06:00
Jeremy Soller
92cad6fe13
Decouple editing from buffer 2022-10-31 11:24:36 -06:00
Jeremy Soller
cce821e99f
Adjust attribute spans when buffer lines change 2022-10-27 14:51:46 -06:00
Jeremy Soller
2b1e884ca7
Use SwashCache in doc example 2022-10-27 11:02:56 -06:00
Jeremy Soller
8f8cf80bf6
Update documentation 2022-10-27 10:29:19 -06:00
Jeremy Soller
4798c7ee1a
Add initial rich text example 2022-10-26 14:16:48 -06:00
Jeremy Soller
84f4381cdf
Add text attributes 2022-10-25 14:14:23 -06:00
Jeremy Soller
a9b7b4e914
Add layout run iterator 2022-10-25 12:52:46 -06:00
Jeremy Soller
1c341f3126
Make swash optional, add swash cache abstraction 2022-10-25 10:55:24 -06:00
Jeremy Soller
564dab009c Relicense MIT OR Apache 2.0 2022-10-24 12:58:15 -06:00
Jeremy Soller
410d4ee674
Text library moved from libcosmic 2022-10-18 12:07:22 -06:00