documents: a text past the read limit drops the old read
CI / platforms (windows-latest) (push) Failing after 9s
CI / site (push) Successful in 31s
CI / crate (push) Failing after 11m24s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-12 02:49:00 -04:00
1 parent 69b11d7852
commit f59c9f7f50
2 files changed
+12 -5

No files matched your search

+7 -1
View File
@@ -234,7 +234,13 @@ impl MarkdownDocument {
let (text, edits) = (self.editor.read(cx).text().to_string(), self.edits);
if text.len() > LARGEST_READ {
self._parsing = None;
return log::info!("markdown document: {} bytes, too long to read", text.len());
log::info!("markdown document: {} bytes, too long to read", text.len());
// Nothing read: no blocks, no headings.
let unread = Parsed {
text,
..Parsed::default()
};
return self.adopt(unread, edits, cx);
}
if now && text.len() <= AT_ONCE {
self._parsing = None;