Jeremy Soller
0a11fb1045
Make Editor::buffer_ref accessible, rename lifetimes
2024-01-17 13:31:03 -07:00
Jeremy Soller
cbbf6f0d8f
Allow Editor to use reference or Arc of Buffer
2024-01-17 13:31:03 -07:00
Jeremy Soller
ae030e9885
Move color and x_opt out of Cursor
2024-01-17 13:31:03 -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
e7261fc06e
Editor: remove unused cursor_x_opt
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
Jeremy Soller
94e6cdefda
Add select by word and double/triple click actions
2023-12-12 10:29:14 -07:00
Jeremy Soller
de6f2c7fbe
Editor: make delete_range and insert_at methods public
2023-12-05 10:04:50 -07:00
Jeremy Soller
1cf36f8a5d
Editor: set selection to none when deleted
2023-11-30 14:42:39 -07:00
Jeremy Soller
cbd567d238
Support line selection
2023-11-28 10:42:50 -07:00
Jeremy Soller
7d21045b2f
Add primitive auto indent
2023-11-16 08:59:43 -07:00
Jeremy Soller
1207fd6d80
Edit: use u16 for tab_width
2023-11-16 08:38:48 -07:00
Jeremy Soller
19ae07bd3b
Fix some clippy lints
2023-11-15 09:21:13 -07:00
Jeremy Soller
6536231dfc
Fix no_std compilation
2023-11-15 09:09:47 -07:00
Jeremy Soller
56f71ef973
Shape if needed to process left/right commands
2023-11-14 13:43:33 -07:00
Jeremy Soller
0eefb12608
Editor: Fix indent/unindent empty lines
2023-11-14 09:03:36 -07:00
Jeremy Soller
5352fdee94
Undo/redo support in ViEditor
2023-11-13 13:31:06 -07:00
Jeremy Soller
7830f4107c
Enable external change tracking
2023-11-13 12:37:07 -07:00
Jeremy Soller
c79c132694
Editor: Fix SoftHome
2023-11-08 15:32:11 -07:00
Jeremy Soller
7a4cf29d4d
Editor: shaped and layout lines inserted by Action::Enter
2023-11-08 11:56:16 -07:00
Jeremy Soller
db0883b525
Editor: add GotoLine action
2023-11-07 15:56:31 -07:00
Jeremy Soller
7855dce09d
Add indent action and tab width
2023-11-01 13:31:53 -06:00
Jeremy Soller
7526fa9726
Editor: Request redraw/scroll on set_cursor
2023-10-20 13:54:54 -06:00
Jeremy Soller
4adcbf6784
Editor: add SoftHome action to skip blank space
2023-10-20 10:25:46 -06:00
Héctor Ramón Jiménez
0bb02227de
Use attributes at cursor position for insertions in Editor
2023-09-17 22:37:18 +02:00
Héctor Ramón Jiménez
cb83458e7d
Rewrite PreviousWord logic in Editor with iterators
2023-09-16 16:18:58 +02:00
Héctor Ramón Jiménez
4aacd436c3
Fix NextWord action in Editor when line ends with word boundaries
2023-09-16 16:18:58 +02:00
Héctor Ramón Jiménez
797f1c7941
Set cursor_moved to true in Editor::insert_string
2023-09-16 16:18:58 +02:00
Héctor Ramón Jiménez
6235716beb
Make Edit::copy_selection immutable
2023-09-16 16:18:56 +02:00
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
Héctor Ramón Jiménez
eb09cf0259
Introduce PhysicalGlyph for offsetting and scaling
2023-06-20 06:07:24 +02:00
Jeremy Soller
e8b10fd675
Base selection on the top of the line
2023-06-16 07:03:43 -06:00
Dima Rets
6dba04df08
allow setting cursor
2023-06-10 12:53:34 +01:00
Dima Rets
0eb08d218c
allow setting cursor color
2023-06-08 20:04:56 +01: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
3331f41d7a
Improve documentation
2023-03-12 10:39:57 +01:00
Edgar Geier
384c5c1fdc
Remove Mutex from FontSystem
2023-03-12 10:39:56 +01:00
Edgar Geier
057b5b6fa9
Extract borrow of FontSystem from Buffer
2023-03-12 10:39:54 +01:00
Jeremy Soller
bd27ca8ad8
Merge pull request #88 from geieredgar/clippy-fixes
...
Fix clippy warnings
2023-03-02 14:53:08 -07:00
Edgar Geier
6c501c6640
Fix clippy warnings
2023-03-01 22:58:41 +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
Audrey Dutcher
c6cf57e213
Add enum for cursor affinity; rename constructor to new_with_affinity
2023-01-19 09:19:54 -07:00
Audrey Dutcher
da842ec10d
Add cursor affinity
2023-01-19 09:19:54 -07:00
Jeremy Soller
8cc988d374
Run cargo fmt
2023-01-04 20:03:03 -07:00
Jeremy Soller
00bc4d1e88
Fix tests
2023-01-04 20:02:00 -07:00
Audrey Dutcher
25d04ace1c
Do not crash when inserting empty string
2023-01-04 18:41:26 -07:00
Audrey Dutcher
4616ca7dd9
Fix Insert('\n')
2023-01-04 18:41:26 -07:00
Audrey Dutcher
8e09a128bb
Many upgrades for Editor
2023-01-04 18:41:26 -07:00