Make anchor_in_excerpt Optional (#8975)
We were seeing panics due to callers assuming they had valid excerpt_ids, but that cannot easily be guaranteed across await points as anyone may remove an excerpt. Release Notes: - Fixed a panic when hovering in a multibuffer
This commit is contained in:
@@ -2413,7 +2413,9 @@ impl ConversationEditor {
|
||||
.read(cx)
|
||||
.messages(cx)
|
||||
.map(|message| BlockProperties {
|
||||
position: buffer.anchor_in_excerpt(excerpt_id, message.anchor),
|
||||
position: buffer
|
||||
.anchor_in_excerpt(excerpt_id, message.anchor)
|
||||
.unwrap(),
|
||||
height: 2,
|
||||
style: BlockStyle::Sticky,
|
||||
render: Arc::new({
|
||||
|
||||
Reference in New Issue
Block a user