mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-08 19:51:19 +03:00
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>
This commit is contained in:
parent
0bbff090f0
commit
070069d65e
@ -271,6 +271,7 @@ where
|
||||
}
|
||||
|
||||
self.at_end = self.stack.is_empty();
|
||||
debug_assert!(self.stack.is_empty() || self.stack.last().unwrap().tree.0.is_leaf());
|
||||
}
|
||||
|
||||
pub fn descend_to_first_item<F>(&mut self, mut subtree: &'a SumTree<T>, filter_node: F)
|
||||
@ -656,6 +657,7 @@ where
|
||||
}
|
||||
|
||||
self.at_end = self.stack.is_empty();
|
||||
debug_assert!(self.stack.is_empty() || self.stack.last().unwrap().tree.0.is_leaf());
|
||||
if bias == SeekBias::Left {
|
||||
let mut end = self.seek_dimension.clone();
|
||||
if let Some(summary) = self.item_summary() {
|
||||
|
Loading…
Reference in New Issue
Block a user