Commit Graph
758 Commits
Author SHA1 Message Date
Antonio Scandurra 874f21914f Handle reversed selections correctly in split_selection_into_lines 2021-05-07 14:54:46 +02:00
Antonio Scandurra 4fcedf4269 Include debug symbols in release mode 2021-05-07 14:42:56 +02:00
Antonio Scandurra ffbfcd6add 💄 2021-05-07 14:38:21 +02:00
Antonio Scandurra bc3c5b6b34 Implement split_selection_into_lines for buffer 2021-05-07 14:32:57 +02:00
Antonio Scandurra 1a700d12f8 Don't report folds that touch the endpoints of the given range
Fold ranges are exclusive, exactly like the query ranges. So if the end
of a fold coincides with the start of the query range, we shouldn't
report that fold. Analogously, if the start of a fold coincides with the
end of the query range, that fold shouldn't be reported.
2021-05-07 14:30:40 +02:00
Antonio Scandurra bd3b6d7041 Implement select_line for buffer 2021-05-07 11:13:21 +02:00
Antonio Scandurra 93c3097a5c Merge pull request #41 from zed-industries/faster-fold-querying
Optimize querying folds
2021-05-07 10:09:34 +02:00
Antonio Scandurra 8d2871fca2 Verify FoldMap::unfold in randomized test 2021-05-07 09:39:55 +02:00
Max Brunsfeld 19d8fa2fe3 Fix handling of new files with new buffer/file structure 2021-05-06 21:06:20 -07:00
Nathan SoboandMax Brunsfeld a0c8ac3fdc Refocus root view if focused view is removed
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 16:30:10 -06:00
Nathan SoboandMax Brunsfeld 5eb0610d47 Don't retain entities after EntityTasks are dropped
This allows us to spawn long-running tasks without leaking entities, but it also ensures that if we *do* hold on to a task, that the entity exists until the future or stream complete so that the task doesn't need to return an Option type.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 16:19:38 -06:00
Nathan SoboandMax Brunsfeld 3197c132c8 Replace zed::watch with postage::watch for settings
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 15:27:18 -06:00
Nathan SoboandMax Brunsfeld 60f2a6572a Create a pending view handle before creating a view
This way, if we create and drop a handle during the creation of a view, we don't drop the view before we have a chance to increment its initial reference count.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 15:18:09 -06:00
Nathan SoboandMax Brunsfeld 4f61ef1383 Gracefully handle a view being updated and removed in the same tick
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 15:13:26 -06:00
Nathan SoboandMax Brunsfeld 9a4bc3839b Hold a WeakViewHandle in BufferElement
Otherwise, the element never goes away because the view never goes away because the element is holding a strong reference.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-05-06 15:13:01 -06:00
Max Brunsfeld 3b30251112 In handle ::condition, re-poll on events as well as notifications 2021-05-06 13:18:41 -07:00
Antonio ScandurraandNathan Sobo f48cf73530 Batch fold insertion
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-06 19:50:51 +02:00
Antonio ScandurraandNathan Sobo d8ed450431 Merge FoldRange into Fold
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-06 19:36:19 +02:00
Antonio ScandurraandNathan Sobo d350cf7185 Always provide a context to sum tree's methods
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-06 19:29:38 +02:00
Antonio ScandurraandNathan Sobo fdf89a3955 Ignore empty folds in FoldMap::fold
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-06 18:53:09 +02:00
Antonio Scandurra c519aaa352 Add FoldMap::folds_in_range to randomized test and fix issues it found 2021-05-06 18:49:41 +02:00
Max Brunsfeld 02b2c181d3 Merge branch 'master' into new-file 2021-05-06 09:19:16 -07:00
Antonio Scandurra 5eae0c1109 Remove add_summary_with_ctx and always require a ctx in add_summary 2021-05-06 16:57:47 +02:00
Antonio Scandurra 2e2e170d78 Implement FoldMap's folds using a SumTree
This required passing a `Context` object to `Summary` and introducing a
new `SeekDimension` trait that allows comparing two dimensions and pass
an additional context object.
2021-05-06 16:20:23 +02:00
Antonio Scandurra 4594edb609 Add a Summary trait in preparation of passing a context struct 2021-05-06 09:32:14 +02:00
Nathan Sobo 204e91adcd Implement Drop on AnyViewHandle
This was a pretty bad oversight.
2021-05-05 23:21:39 -06:00
Nathan Sobo f4e0b69bd3 Require window to have a root view and focused view
This is possible now that the window doesn't need to own the view. We can create the root view before we create the window.
2021-05-05 23:21:19 -06:00
Nathan Sobo 91f4d0ffe3 Don't store views on windows
Instead, store all views in a single top-level map that's keyed by window id and view id. This ensures we'll keep a view alive even if its window is gone, so long as we're holding a handle. This can happen with things like spawned tasks. We don't want to panic during a spawned task after we close the window.
2021-05-05 22:48:16 -06:00
Max Brunsfeld f3df06a82c Restore Buffer::file field and workspace::Item trait 2021-05-05 18:08:18 -07:00
Max Brunsfeld fd18b93ad0 Maintain workspace buffers state after saving untitled buffer 2021-05-05 13:12:51 -07:00
Max Brunsfeld 2f2659a7ad Wait to update bufferview's file handle until save has completed 2021-05-05 11:05:50 -07:00
Max Brunsfeld 2e5d292c4b Add TestAppContext::simulate_new_path_selection 2021-05-05 11:04:39 -07:00
Nathan Sobo 10147df5c3 Fix crash when closing windows 2021-05-05 11:34:49 -06:00
Antonio Scandurra fa22e6b5f1 Merge pull request #39 from zed-industries/move-lines-folds
Synchronize `FoldMap` with buffer's contents lazily
2021-05-05 10:47:52 +02:00
Antonio Scandurra b8f66d759c Add test for moving lines up and down 2021-05-05 10:23:35 +02:00
Antonio Scandurra 96af0ed032 Merge branch 'master' into move-lines-folds 2021-05-05 09:58:34 +02:00
Max Brunsfeld 02afdfa9de Start work on creating and saving new files 2021-05-04 19:04:11 -07:00
Nathan Sobo 58b77e8b05 Merge pull request #30 from zed-industries/bundle
WIP: Create and upload application bundle in CI
2021-05-04 18:02:47 -06:00
Nathan Sobo 27c4b384cf Add ~/.rustup to the list of cached paths
And restore skipping of rust install if it hasn't changed.
2021-05-04 17:46:44 -06:00
Nathan Sobo b54037873e Try to disable caching 2021-05-04 17:38:05 -06:00
Nathan Sobo 7493979594 Try to fix target not being installed 2021-05-04 17:34:03 -06:00
Nathan Sobo 0f0ec0f275 Ad hoc code-sign the app bundle
Apparently this is necessary to run on the M1 macs
2021-05-04 17:29:39 -06:00
Nathan Sobo f01724b782 Create the bundle as a "fat binary" supporting the M1 2021-05-04 17:18:25 -06:00
Nathan Sobo a7821e1a0f Fix artifact name 2021-05-04 17:18:25 -06:00
Nathan Sobo ffde8dac43 Create and upload a DMG 2021-05-04 17:18:25 -06:00
Nathan Sobo 1cf31de9ee Attempt to upload app bundle as an artifact 2021-05-04 17:18:25 -06:00
Nathan Sobo ea5abbbcb8 Add script/bundle, which creates a macOS app bundle 2021-05-04 17:18:25 -06:00
Max Brunsfeld 10781c2cb7 Merge pull request #34 from zed-industries/buffer-per-inode
Only open one buffer per inode, but associate each buffer view with its own path
2021-05-04 14:37:27 -07:00
Max BrunsfeldandNathan Sobo e5d86fbbc9 Replace Workspace::open_path with simpler ::add_worktree method
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-05-04 14:18:16 -07:00
Max Brunsfeld 0c5ab2c4f5 Fix hangs in workspace tests 2021-05-04 12:41:00 -07:00