Antonio Scandurra and Nathan Sobo
ecfc793cc7
Synchronize FoldMap with buffer's contents lazily
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-05-04 18:27:56 +02:00
Antonio Scandurra
566a5e9f9d
Use correct bias when calculating next_row_end
2021-05-04 16:13:01 +02:00
Antonio Scandurra
fdf3a5c656
Add FoldMap::chars_at to randomized test
2021-05-04 14:13:28 +02:00
Antonio Scandurra
e4afd19ee8
Test FoldMap to_display_offset, to_display_point, to_buffer_point
2021-05-04 12:16:35 +02:00
Antonio Scandurra
77ea97b47f
Rework randomized test, ensuring order of folds is maintained correctly
2021-05-04 11:27:32 +02:00
Antonio Scandurra
78d837a56f
Fix folds_in_range and add a test for it
...
With the current ordering, a linear scan is required in order to
determine which folds intersect the given range.
2021-05-04 11:24:33 +02:00
Nathan Sobo
81dbf8d265
Merge branch 'master' into buffer-per-inode
2021-05-03 20:47:28 -06:00
Nathan Sobo
1c2b957f7f
Rename WorkspaceView to Workspace and reorganize module
2021-05-03 20:42:32 -06:00
Nathan Sobo
449ad6d3da
Inline methods previously moved from Workspace
2021-05-03 20:36:12 -06:00
Nathan Sobo and Max Brunsfeld
af1c03fcdc
Combine Workspace and WorkspaceView
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-05-03 20:15:55 -06:00
Nathan Sobo
9a6a66cdb9
Merge pull request #37 from zed-industries/move-line-up-down
...
Move line up and down
2021-05-03 18:25:42 -06:00
Nathan Sobo and Max Brunsfeld
47be565ce5
Clean up
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-05-03 16:33:13 -06:00
Nathan Sobo and Max Brunsfeld
1dd77fbff0
Make Workspace::open_entry2, which returns a dyn ItemViewHandle
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-05-03 16:25:18 -06:00
Nathan Sobo and Max Brunsfeld
e4a73d28e0
Fix cases where new folds that end where existing folds start
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-05-03 14:30:50 -06:00
Max Brunsfeld
5f19e726cf
Add failing unit test for adjacent folds
2021-05-03 12:39:47 -07:00
Antonio Scandurra
71245a6440
WIP
2021-05-03 18:58:39 +02:00
Antonio Scandurra
394c3367ae
Account for folds when moving selections up/down
2021-05-03 16:13:09 +02:00
Antonio Scandurra
91fc2da367
Use a more direct manipulation for moving lines up or down
2021-05-03 15:10:20 +02:00
Antonio Scandurra
3582796317
Push selections down correctly when moving a line down
2021-05-03 14:49:35 +02:00
Antonio Scandurra
c2564bb4e4
Implement move_line_up and move_line_down
...
This does not restore folds yet.
2021-05-03 11:37:36 +02:00
Antonio Scandurra
7b6e5675dd
Merge pull request #35 from zed-industries/move-to-prev-next-word-boundary
...
Implement word boundary movement/selection/deletion
2021-04-30 16:34:06 +02:00
Antonio Scandurra
9438399cbe
Merge pull request #36 from zed-industries/bind-backspace
...
Bind `ctrl-h` to `backspace`
2021-04-30 11:36:50 +02:00
Antonio Scandurra
0119e709c2
Bind ctrl-h to backspace
2021-04-30 10:45:58 +02:00
Antonio Scandurra
2745324d31
Add test for word boundary movement/selection/deletion
2021-04-30 10:14:20 +02:00
Antonio Scandurra
e5698c73ff
Implement delete_to_{previous,next}_word_boundary
2021-04-30 10:14:20 +02:00
Antonio Scandurra
7e4532d36e
Implement select_to_{previous,next}_word_boundary
2021-04-30 10:14:20 +02:00
Antonio Scandurra and Max Brunsfeld
19ee9e81ea
Implement move_to_previous_word_boundary
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-04-30 10:14:20 +02:00
Antonio Scandurra and Nathan Sobo
6dd51fe6b8
Implement move_to_next_word_boundary for buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-30 10:14:20 +02:00
Antonio Scandurra
9120280d6e
Merge pull request #32 from zed-industries/editor-keybindings
...
Initial editor keybindings
2021-04-30 09:31:32 +02:00
Max Brunsfeld
d5d61ee604
Move file handle from buffer to buffer view
2021-04-29 17:47:06 -07:00
Max Brunsfeld
a952dfe46b
Merge pull request #31 from zed-industries/open-files
...
Allow opening files from the CLI and from the File > Open menu
2021-04-29 15:14:37 -07:00
Max Brunsfeld
898d1ccb17
Avoid cancelling ::open_entry task in FileFinder
2021-04-29 15:03:46 -07:00
Max Brunsfeld and Nathan Sobo
0b11e9bde1
Return a future from WorkspaceView::open_paths
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-04-29 14:55:28 -07:00
Max Brunsfeld
bdc932c9c1
Tweak durations in fsevent unit test to reduce odds of timeout
2021-04-29 12:52:28 -07:00
Max Brunsfeld
fa72a280f7
In file finder, handle single-file worktrees & multiple matches w/ same rel path
2021-04-29 12:44:51 -07:00
Antonio Scandurra
508f3c33c5
💄
2021-04-29 10:38:11 +02:00
Antonio Scandurra
4b983d2f33
Implement {move_to,select_to,delete_to}_{beginning,end}_of_line
2021-04-29 10:38:11 +02:00
Antonio Scandurra
0ae5fda5ec
Don't rely on Range::is_empty to check for selection emptiness
...
This method returns true when `start > end`, so our `backspace` and
`delete` implementations were subtly wrong because they always deleted
one extra character for reversed selections.
2021-04-29 10:38:11 +02:00
Antonio Scandurra
0762c33caa
Implement duplicate_line for buffer
2021-04-29 10:38:11 +02:00
Antonio Scandurra
cf0ec598ab
Extract a Selection::buffer_row_range method
2021-04-29 10:38:11 +02:00
Antonio Scandurra
ec7f383c57
Fix delete_line for non-empty selections that end at the start of line
2021-04-29 10:38:11 +02:00
Antonio Scandurra
b6b9059ab7
Bind also ctrl-d to buffer:delete
2021-04-29 10:38:11 +02:00
Antonio Scandurra
f63254eaa8
Fix delete_line test
2021-04-29 10:38:11 +02:00
Antonio Scandurra
81d8258eae
WIP: start on a test for delete_line
...
Discovered a bug that's highlighted by the test that causes selections
to not be in the right order.
2021-04-29 10:38:11 +02:00
Antonio Scandurra
a78dcaed46
Implement delete_line for buffer
...
This still needs unit tests.
2021-04-29 10:38:11 +02:00
Antonio Scandurra
5c1640a7c0
Don't propagate action when selecting up/down in single-line editors
2021-04-29 10:38:11 +02:00
Antonio Scandurra
616e2ea553
Implement select_to_beginning and select_to_end for buffer
2021-04-29 10:38:11 +02:00
Antonio Scandurra
3704242882
Implement move_to_beginning and move_to_end for buffer
2021-04-29 10:38:11 +02:00
Antonio Scandurra
e02772a98f
Implemente delete for buffer
2021-04-29 10:38:11 +02:00
Antonio Scandurra
c903fc8df8
Implement select_all for buffer
2021-04-29 10:38:11 +02:00