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
04d53ac5f4
Add Scroll::new
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
b877f873df
BufferLine: remove wrap from struct, as wrap is passed to layout
2024-01-17 13:31:03 -07:00
Jeremy Soller
816ea4fae7
BufferLine: use layout_in_buffer to implement layout
2024-01-17 13:31:03 -07:00
Jeremy Soller
80d120dfa5
Ensure that all shaping and layout uses scratch buffer
2024-01-17 13:31:03 -07:00
Jeremy Soller
5d1aa67804
Improve reliability of layout_cursor
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
c247e0527c
Only apply attrs to range in syntect editor if it does not match default
2024-01-17 13:31:03 -07:00
Jeremy Soller
19b4d8336e
Use crate::HashMap in SwashCache
2023-12-19 17:02:28 -07:00
Jeremy Soller
430b3abc9f
Fix no_std build
2023-12-19 17:02:15 -07:00
David Stern
73acfb0962
Cache rustybuzz shape plans.
2023-12-18 18:19:27 -05:00
Jeremy Soller
94e6cdefda
Add select by word and double/triple click actions
2023-12-12 10:29:14 -07:00
Jeremy Soller
6566350276
ViEditor::finish_change will store change to history
2023-12-12 09:52:22 -07:00
Jeremy Soller
3187e916ab
ViEditor: cleanup logging
2023-12-08 12:03:55 -07:00
Jeremy Soller
b7bdd62eb3
ViEditor: update modit and improve put implementation
2023-12-05 10:05:26 -07:00
Jeremy Soller
de6f2c7fbe
Editor: make delete_range and insert_at methods public
2023-12-05 10:04:50 -07:00
Jeremy Soller
afc5b525f1
Buffer: fix max scroll going one line beyond end
2023-11-30 14:51:22 -07:00
Jeremy Soller
1cf36f8a5d
Editor: set selection to none when deleted
2023-11-30 14:42:39 -07:00
Jeremy Soller
9278e7d0c4
ViEditor: Implement put/yank registers
2023-11-30 13:42:52 -07:00
Jeremy Soller
04c96f39c5
Allow Clone of layout structs
2023-11-30 13:00:02 -07:00
Jeremy Soller
cbd567d238
Support line selection
2023-11-28 10:42:50 -07:00
Jeremy Soller
66a6803cf8
Merge remote-tracking branch 'origin/main' into vi-editor
2023-11-17 08:30:08 -07:00
Kristoffer Ödmark
d242307b6d
refresh the attrs more often in basic shaping, or colors are not updated correctly
2023-11-16 21:47:41 +01: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
38bed64ef1
Use cosmic_undo_2 instead of undo_2 for improved compiler support
2023-11-15 09:09:46 -07:00
Jeremy Soller
56f71ef973
Shape if needed to process left/right commands
2023-11-14 13:43:33 -07:00
Jeremy Soller
abf58279be
Implement TextObject::Search
2023-11-14 13:23:00 -07:00
Jeremy Soller
bab94a7823
Join together vim changes
2023-11-14 12:28:56 -07:00
Jeremy Soller
0eefb12608
Editor: Fix indent/unindent empty lines
2023-11-14 09:03:36 -07:00
Jeremy Soller
4c85a6be72
ViEditor: Track when changed
2023-11-13 14:46:46 -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
e942e649ed
Support LeftInLine and RightInLine motions
2023-11-13 11:10:05 -07:00
Jeremy Soller
b3c5f14e47
Remove two-face (it can be added by user of library)
2023-11-13 10:42:03 -07:00
Jeremy Soller
d001e5c09e
Implement all modit motions required
2023-11-12 19:01:20 -07:00
Jeremy Soller
fbc33c183a
Convert more actions to modit keys, fix passthrough
2023-11-10 15:53:19 -07:00
Jeremy Soller
ddcd3c8795
Support search
2023-11-10 12:23:00 -07:00
Jeremy Soller
e8dd8ec7d1
Support modit::Key enum
2023-11-10 09:47:45 -07:00
Jeremy Soller
9efcc41a5a
Remove unused import and implemented todo
2023-11-09 09:35:04 -07:00
Jeremy Soller
c79c132694
Editor: Fix SoftHome
2023-11-08 15:32:11 -07:00
Jeremy Soller
d7e066c105
Support more modit events
2023-11-08 14:23:13 -07:00
Jeremy Soller
aece6486b9
Adapt to newer modit
2023-11-08 11:57:02 -07:00
Jeremy Soller
7a4cf29d4d
Editor: shaped and layout lines inserted by Action::Enter
2023-11-08 11:56:16 -07:00