Commit Graph
48 Commits
Author SHA1 Message Date
Antonio Scandurra f9671ca100 Maintain cursor stack's position correctly when ascending the tree
This fixes a bug that could cause the cursor to incorrectly report its
start when using `slice` or `seek_forward`, and then calling `prev`. We
didn't notice this because we were not testing those three methods
together.

I suppose this could explain some of the panics we've observed because
we do use `slice`/`seek_forward` followed by `prev` calls in production.
2023-07-27 12:34:03 +02:00
Antonio Scandurra 1a0d9873b2 Account for inlay biases when clipping a point 2023-06-29 22:25:50 +03:00
Antonio Scandurra bf853d0f25 Add Cursor::next_item 2023-06-29 22:25:50 +03:00
Kirill BulatovandAntonio Scandurra aa03364d16 Better bias selection for hints that prefix the type
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Nathan Sobo e526fd506e Rename SumTree::push_tree to ::append 2023-06-19 19:49:33 -06:00
Mikayla Maki 7b7282fa47 Fix several randomized test failures with the new git status implementation 2023-06-07 14:10:17 -07:00
Mikayla MakiandNathan bdf7e377f8 Made the map seek target a publicly implementable interface
Integrated remove_range with the existing git code

co-authored-by: Nathan <nathan@zed.dev>
2023-05-12 08:37:32 -07:00
Nathan Sobo fa0fa1075e Add TreeMap::remove_between that can take abstract start and end points
This commit introduces a new adaptor trait for SeekTarget that works around
frustrating issues with lifetimes. It wraps the arguments in a newtype wrapper
that lives on the stack to avoid the lifetime getting extended to the caller
of the method.

This allows us to introduce a PathSuccessor object that can be passed as the
end argument of remove_between to remove a whole subtree.
2023-05-12 08:21:01 -07:00
Mikayla Maki 2430c6b9eb fmt 2023-05-11 16:06:56 -07:00
Mikayla MakiandNathan aa69083b7f Use more efficient sum tree traversals for removal and improve ergonomics with iter_from
co-authored-by: Nathan <nathan@zed.dev>
2023-05-11 16:06:25 -07:00
Mikayla Maki 491f707217 Fix test 2023-05-11 12:03:39 -07:00
Mikayla Maki 50a6410ae8 fmt 2023-05-11 12:02:25 -07:00
Mikayla Maki 4e408e7758 Added status trickle up 2023-05-11 12:01:42 -07:00
Mikayla Maki d2ce29f171 Got basic replication working :) 2023-05-10 17:37:36 -07:00
Mikayla Maki 970bdb1ee1 Use sum tree traversal to remove paths 2023-05-10 17:37:36 -07:00
Mikayla Makiandpetros 5ab87cd95c WIP: Track live entry status in repository
co-authored-by: petros <petros@zed.dev>
2023-05-10 17:37:36 -07:00
Mikayla Maki c1dcd83835 Fix TreeMap retain 2023-05-08 14:33:58 -07:00
Mikayla MakiandNathan 627994ab94 WIP: Convert old git repository vec to new treemap based approach.
co-authored-by: Nathan <nathan@zed.dev>
2023-05-08 14:33:58 -07:00
Mikayla MakiandNathan b84f88b61a Add a data driven representation of the current git repository state to the worktree snapshots
WIP: Switch git repositories to use SumTrees

Co-authored-by: Nathan <nathan@zed.dev>
2023-05-08 14:33:58 -07:00
Antonio Scandurra 8b5cdda569 Initialize the active editor when vim mode is enabled
Instead of waiting for a focus event. This makes more tests pass.
2023-04-20 14:02:40 -06:00
Max Brunsfeld 42e6ac50ea Restructure background scanner to handle refresh requests even while scanning 2023-04-12 16:29:51 -07:00
Joseph Lyons d9a7e1fed6 Appease clippy 2023-01-01 23:50:45 -05:00
Julia d100acd3b1 Initial hacky displaying of git gutter in multi-buffers 2022-12-13 12:35:58 -05:00
JuliaandMax Brunsfeld 60bff07555 Move cloneable diff state into new snapshot type
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-29 13:16:02 -04:00
Max Brunsfeld 94eb0d6c55 Start work on a SyntaxMap data structure 2022-08-21 11:37:10 -07:00
ForLoveOfCatsandMikayla fbea44bc5c One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Antonio Scandurra 8d996bc013 Introduce a new TreeSet struct in sum_tree
This is just a special case of `TreeMap<K, V>` where `V = ()`.
2022-07-18 13:40:30 +02:00
Max BrunsfeldandNathan Sobo 8c901cb6a1 Prevent eager snapshot mutations from being clobbered by background updates
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-04 15:10:39 -07:00
d86f385278 Allow guests to rename stuff
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-04 10:28:44 -07:00
Antonio ScandurraandNathan Sobo 3217629af3 Don't seek FilterCursor upon creation
This lets us use `next` or `prev` to decide whether to park the cursor
at the first or last filtered item.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:13:23 +01:00
Antonio ScandurraandNathan Sobo bbd6140677 Randomize test FilterCursor::prev
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:13:23 +01:00
Antonio Scandurra c2c68cbfe9 Start on implementing filtering support for Cursor::prev 2022-03-15 15:13:23 +01:00
Nathan Sobo 1e76d109a3 WIP 2022-03-10 11:32:14 -07:00
Antonio ScandurraandNathan Sobo 240e42d2ff Refine project find's UX
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-25 15:27:34 +01:00
Max Brunsfeld 5cdf498001 In random collaboration test, add failing assertion for worktree convergence 2022-02-15 14:55:38 -08:00
Nathan SoboandMax Brunsfeld df5b181ad8 Send diagnostic summaries to guests when they join the project
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-06 12:12:09 -07:00
Antonio Scandurra 866e9bbc6a Fix TreeMap::get always returning None 2022-01-05 15:41:30 +01:00
Antonio Scandurra d53322bd05 Write a simple unit test for TreeMap and fix bug in remove 2021-12-13 11:20:10 +01:00
Nathan Sobo 9836638fb5 More messy progress towards selections in editors 2021-12-11 00:29:34 -07:00
Nathan Sobo 1078299acc Relax TreeMap value bounds, fix warnings, simplify cmp 2021-12-10 23:35:24 -07:00
Nathan Sobo ce4c84ca70 Introduce sum_tree::TreeMap<K, V>
I think this will be useful to avoid cloning HashMaps in certain cases such as snapshots.
2021-12-10 23:33:15 -07:00
Antonio ScandurraandNathan Sobo a29758b389 Remove anchor collections
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-09 17:28:27 +01:00
Nathan SoboandMax Brunsfeld 93322a4858 Name the root file of every crate after the crate to ease navigation
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-30 12:46:39 -07:00
Nathan Sobo ee2ea9432a WIP: Probably the wrong direction 2021-11-10 17:44:56 -07:00
Antonio ScandurraandNathan Sobo 8a5bee616d Communicate with language servers in terms of UTF-16 coordinates
This required indexing UTF-16 positions in `Rope`. We tried opting
into the UTF-8 experimental support but it didn't seem to work
correctly and the standard is UTF-16 anyway.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-29 18:33:23 +02:00
Max Brunsfeld 825fb94fc6 Merge branch 'anchor-map-selections' into lsp 2021-10-28 17:08:06 -07:00
Antonio Scandurra 165161687c Introduce Content::anchor_range_multimap 2021-10-26 14:28:02 +02:00
Nathan SoboandMax Brunsfeld a1b11e8907 Move all crates to a top-level crates folder
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:22:21 -06:00