{"record":{"id":"fad572615023dfd2","repo":"zed-industries/zed","slug":"just-put-them-in","errorCode":null,"errorMessage":"just put them in","messagePattern":"just put them in","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/search/src/text_finder/delegate.rs","lineNumber":682,"sourceCode":"    let search_id = project_search_view.update(cx, |view, cx| {\n        view.entity.update(cx, |search, _| {\n            search.match_ranges.clear();\n            search.search_id\n        })\n    });\n\n    let context_lines = cx.update(|cx| multibuffer_context_lines(cx));\n\n    let still_current = |cx: &mut AsyncApp| {\n        project_search_view.update(cx, |view, cx| view.entity.read(cx).search_id == search_id)\n    };\n\n    let mut excerpts_added = 0;\n    for buffer_id in buffer_order_in_text_finder {\n        if !still_current(cx) {\n            return PopulateProjectSearch::SupersededByNewSearch;\n        }\n        let (buffer, ranges) = by_buffer.remove(&buffer_id).expect(\"just put them in\");\n        excerpts_added += ranges.len();\n        let new_ranges = excerpts\n            .update(cx, |excerpts, cx| {\n                excerpts.set_anchored_excerpts_for_path(\n                    PathKey::for_buffer(&buffer, cx),\n                    buffer,\n                    ranges,\n                    context_lines,\n                    cx,\n                )\n            })\n            .await;\n\n        if !still_current(cx) {\n            return PopulateProjectSearch::SupersededByNewSearch;\n        }\n        project_search_view.update(cx, |view, cx| {\n            view.entity.update(cx, |search, cx| {","sourceCodeStart":664,"sourceCodeEnd":700,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/search/src/text_finder/delegate.rs#L664-L700","documentation":"An assertion in matches_to_multibuffer that match ranges/excerpts for a buffer were inserted ('just put them in'); it fires when the expected excerpts were not added to the multibuffer, indicating an ordering or filtering bug during project search population.","triggerScenarios":"Thrown at crates/search/src/text_finder/delegate.rs:682 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify excerpt insertion for each buffer in buffer_order_in_text_finder","Check match ranges are non-empty and valid before insertion","Return a partial result instead of asserting on population state"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}