mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-02 21:40:41 +01:00
text: Assert text anchor offset validity on construction (#38441)
Attempt to aid debugging some utf8 indexing issues Release Notes: - N/A Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
@@ -5259,7 +5259,8 @@ impl MultiBufferSnapshot {
|
||||
} else {
|
||||
Anchor::max()
|
||||
};
|
||||
// TODO this is a hack, remove it
|
||||
|
||||
// TODO this is a hack, because all APIs should be able to handle ExcerptId::min and max.
|
||||
if let Some((excerpt_id, _, _)) = self.as_singleton() {
|
||||
anchor.excerpt_id = *excerpt_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user