f303a1d
Implement `::chars`, `::to_point` and `::to_offset` for Rope
Antonio Scandurra created
f303a1d
Implement `::chars`, `::to_point` and `::to_offset` for Rope
Antonio Scandurra created
ff235e6
Increase leaf occupation for rope
Antonio Scandurra created
d7cde9f
Don't underflow Rope chunks on append
Antonio Scandurra created
e48973f
Start on a SumTree-based Rope implementation
Antonio Scandurra created
9aeb35b
Get tests passing using a slow rightmost_point impl
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld and Nathan Sobo created
d8f7b35
Fix concurrent editing in buffer after using ropes
Co-Authored-By: Max Brunsfeld <max@zed.dev> Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra , Max Brunsfeld , and Nathan Sobo created
39c56b7
Get local buffer usage working with ropes
Randomized tests for remote edits are still not passing. Co-Authored-By: Max Brunsfeld <max@zed.dev>
Antonio Scandurra and Max Brunsfeld created
7b98fb3
WIP: Get the type checker passing...
...but not the borrow checker! Co-Authored-By: Max Brunsfeld <max@zed.dev>
Antonio Scandurra and Max Brunsfeld created
0e9441e
WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
b348276
Merge pull request #60 from zed-industries/fix-failures
Fix more test flakiness
Antonio Scandurra created
37f0ba9
Increase timeout for fs-dependent conditions
Antonio Scandurra created
4884a05
Change buffer atomically when reloading from disk
Antonio Scandurra created
19f51bc
Rely more on conditions for state derived after worktree changes
Antonio Scandurra created
2c43066
Merge pull request #59 from zed-industries/more-resilient-fs-events
Use `flush_fs_events` more after performing synchronous fs mutations
Antonio Scandurra created
eea9cb4
Use `flush_fs_events` more after performing synchronous fs mutations
I am not sure I have caught all the examples of this, but in general I think we always want to perform a `flush_fs_events` as opposed to `next_scan_complete` when doing synchronous I/O. Indeed, the file system may inform us about the events caused by the just-performed I/O over multiple batches, and `next_scan_complete` may return before seeing all of them. Note that this also removes a few assertions which were ensuring that, on start, a worktree's file handle wouldn't know its deleted status, even if the file didn't exist for sure on disk. However, now that `file` is an async API, it's possible that by the time the `FileHandle` is resolved, `Worktree` has already completed scanning. We test a similar behavior further along in the test where those assertions were removed, so it felt okay to proceed without them.
Antonio Scandurra created
0187b6d
Merge pull request #54 from zed-industries/file-changed-on-disk
Handle buffers' files changing on disk from outside of Zed
Max Brunsfeld created
520cbfb
Read file's mtime in background when getting a FileHandle
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Max Brunsfeld and Antonio Scandurra created
d76d532
Merge branch 'master' into file-changed-on-disk
Max Brunsfeld created
d0b7377
Merge pull request #57 from zed-industries/dropped-entities
Fix panic when an entity's ref count is decremented to 0 and then is incremented again
Max Brunsfeld created
493643c
Remove dropped entities even if there are no effects to flush
Max Brunsfeld created
9dac491
Don't remove entities whose ref count has become positive again
Nathan Sobo created
e81a28e
Remove dropped entities after every effect
Nathan Sobo created
c757b3f
Allow a longer timeout in buffer conflict test
Max Brunsfeld created
4910bc5
Merge branch 'master' into file-changed-on-disk
Max Brunsfeld created
36163f7
Merge pull request #56 from zed-industries/async-ctx
Simplify spawning and asynchronous code
Max Brunsfeld created
d6c8952
Remove commented-out tests for spawn and spawn_stream
Max Brunsfeld created
a3be559
Pass a handle to the current view model when spawning
Most of the time, we'll want a way to get a reference back to the current view or model, so this facilitates that common case.
Nathan Sobo created
fa6bd1f
Introduce AsyncAppContext and simplify spawning
Now when you call spawn in various context, you pass an FnOnce that is called with an AsyncAppContext and returns a static future. This allows you to write async code similar to how our tests work, borrowing the guts of the AsyncAppContext when needed to interact, but using normal async await semantics instead of callbacks. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo and Max Brunsfeld created
d0f69c7
Merge pull request #55 from zed-industries/test-macros
Introduce a `gpui::test` macro for less ceremony when writing tests
Max Brunsfeld created
2326ac3
Use `gpui::test` for tests in gpui
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Antonio Scandurra and Max Brunsfeld created
ab04d71
Use `gpui::test` in async tests in zed
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Antonio Scandurra and Max Brunsfeld created
1c2b381
Use `gpui::test` macro for synchronous tests in zed
Antonio Scandurra created
c7d97ad
Introduce a `gpui::test` macro
Antonio Scandurra created
048bbc9
Test prompting when saving while there's a conflict
Antonio Scandurra created
ac2168f
Update `mtime` and `is_deleted` when saving/loading a file
Antonio Scandurra created
2eff936
Make `MutableAppContext::prompt` private
...as we're supposed to call this method only via ViewContext.
Antonio Scandurra created
6240334
Display prompt when trying to save a conflicting file
Antonio Scandurra created
c54a49e
Use a different tab icon color for buffers with conflicts
Max Brunsfeld created
040189d
Add basic handling for buffer's files changing on disk
Max Brunsfeld created
d5218fb
Add failing test for buffer detecting on-disk changes
Max Brunsfeld created
de6376c
Mark `FileHandle` as not deleted right after saving it
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
e72a309
Add a basic `tab` keybinding
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
e076c2c
Merge pull request #48 from zed-industries/file-deletion
Fix management of buffers' dirty state
Antonio Scandurra created
45b4146
Don't consider scan as being complete until its state is Idle
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
d8f7054
Fix saving files in single-file worktrees
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
d8eed53
Emit `Dirtied` event when a clean buffer's file is deleted
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
02bd9c8
Make sure `next_scan_complete` resolves
Sometimes the scan state could change so quickly that the consumer wouldn't notice that it ever went to a scanning state before going back to an idle state, hence never resolving. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra and Nathan Sobo created
ff5561d
Fix management of buffers' dirty state
* Don't consider files deleted if they just haven't been scanned yet. * Consider a buffer dirty if its file has been deleted. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld and Nathan Sobo created
01b20d5
Merge pull request #51 from zed-industries/add-cursors-and-cancel-selections
Implement `add_selection_above`, `add_selection_below` and `cancel`
Antonio Scandurra created
d9e7547
:lipstick:
Antonio Scandurra created