New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xi_rope multiset panic with syntect plugin enabled #1275
Comments
All that seems to be required is:
Here's a log of everything I sent to the backend before it panicked this time.
|
auto_indent being enabled may be a necessary requirement for reproducing this. at engine.rs:598, here's an example of the values involved:
This is breaking the precondition for |
I've captured the #[test]
fn gc_7() {
let mut engine = Engine::empty();
engine.edit_rev(65536, 1, engine.get_head_rev_id().token(), Delta::simple_edit(Interval::new(0,10), Rope::from(" "), 0));
let d2 = Delta{
els: vec![DeltaElement::Copy(0,1), DeltaElement::Insert(Rope::from("f"))],
base_len: 1,
};
engine.edit_rev(65536, 1, engine.get_head_rev_id().token(), d2);
let d3 = Delta{
els: vec![DeltaElement::Copy(0,2), DeltaElement::Insert(Rope::from("\n"))],
base_len: 2,
};
engine.edit_rev(65536, 2, engine.get_head_rev_id().token(), d3);
// THESE NEXT 2 EDITS ARE WEIRD. They both happen on the same base
// revision, but they're in 2 different undo groups.
let rev_token = engine.get_head_rev_id().token();
let d4 = Delta{
els: vec![DeltaElement::Copy(0,3), DeltaElement::Insert(Rope::from(" "))],
base_len: 3,
};
engine.edit_rev(65536, 3, rev_token, d4);
let d5 = Delta{
els: vec![DeltaElement::Copy(0,3), DeltaElement::Insert(Rope::from(" "))],
base_len: 3,
};
engine.edit_rev(100, 2, rev_token, d5);
let d6 = Delta{
els: vec![DeltaElement::Copy(0,5), DeltaElement::Insert(Rope::from("f"))],
base_len: 5,
};
engine.edit_rev(65536, 4, engine.get_head_rev_id().token(), d6);
let gc : BTreeSet<usize> = [1].iter().cloned().collect();
engine.gc(&gc);
let gc : BTreeSet<usize> = [2].iter().cloned().collect();
engine.gc(&gc);
let gc : BTreeSet<usize> = [3].iter().cloned().collect();
// this panics with 'self must cover all 0-regions of other'
engine.gc(&gc);
} |
So what is happening is that the syntect plugin is inserting indentation (
|
I'm running the latest master, using Linux and a custom frontend. I can reproduce this pretty easily by doing the following:
I'll get a panic that looks like this:
It appears to be hitting this expect statement in
xi_rope::multiset::Subset::transform
The text was updated successfully, but these errors were encountered: