Fix more panics when removing excerpts (#28836)
Release Notes: - Fixed a panic when an excerpt removed has an edit suggestion inlay in it --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
0d8f77b5de
commit
486a9e4d61
5 changed files with 26 additions and 8 deletions
|
@ -4170,10 +4170,13 @@ impl Editor {
|
|||
if let Some(InlaySplice {
|
||||
to_remove,
|
||||
to_insert,
|
||||
}) = self.inlay_hint_cache.remove_excerpts(excerpts_removed)
|
||||
}) = self.inlay_hint_cache.remove_excerpts(&excerpts_removed)
|
||||
{
|
||||
self.splice_inlays(&to_remove, to_insert, cx);
|
||||
}
|
||||
self.display_map.update(cx, |display_map, _| {
|
||||
display_map.remove_inlays_for_excerpts(&excerpts_removed)
|
||||
});
|
||||
return;
|
||||
}
|
||||
InlayHintRefreshReason::NewLinesShown => (InvalidationStrategy::None, None),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue