Antonio Scandurra
32fbdfeab5
Avoid calling add_summary twice in sum_tree::Cursor
...
As I was looking into `SumTree` for the upcoming round of changes to the
buffer, I noticed that we were inadvertently adding summaries twice
every time we skipped over a node in the tree.
This is a pretty heavy code path that's pretty ubiquitous in the
codebase, so this commit gets rid of the unnecessary addition.
2021-05-31 16:45:57 +02:00
Max Brunsfeld
173f99748d
Rename context parameters to cx in sum_tree
2021-05-28 15:32:24 -07:00
Antonio Scandurra and Nathan Sobo
e8179f7e3e
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 Scandurra
178705f8f9
Add FoldMap::folds_in_range to randomized test and fix issues it found
2021-05-06 18:49:41 +02:00
Antonio Scandurra
652fc9e4ec
Remove add_summary_with_ctx and always require a ctx in add_summary
2021-05-06 16:57:47 +02:00
Antonio Scandurra
901525bf77
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
7fb7a6adfc
Add a Summary trait in preparation of passing a context struct
2021-05-06 09:32:14 +02:00
Nathan Sobo and Max Brunsfeld
dced9469f5
WIP
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-04-23 12:47:23 -06:00
070069d65e
Ensure top of cursor stack is either empty or a leaf node
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-04-15 18:12:56 +02:00
Antonio Scandurra
7b6fbe1d89
Compute minimal version_in_range on edit and account for undo
2021-04-09 11:22:22 +02:00
Max Brunsfeld
32500e21f6
Silence sum_tree warnings
...
* Remove unused enum variant
* Add #[allow(unused)] for non-trivial methods
2021-04-02 14:39:56 -07:00
Nathan Sobo
356bc41752
WIP
2021-03-09 21:00:51 -07:00