{"record":{"id":"281e6c21e9703961","repo":"iced-rs/iced","slug":"write-to-cursor-cache","errorCode":null,"errorMessage":"Write to cursor cache","messagePattern":"Write to cursor cache","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"graphics/src/text/editor.rs","lineNumber":73,"sourceCode":"\n    fn internal(&self) -> &Arc<Internal> {\n        self.0\n            .as_ref()\n            .expect(\"Editor should always be initialized\")\n    }\n\n    fn with_internal_mut<T>(&mut self, f: impl FnOnce(&mut Internal) -> T) -> T {\n        let editor = self.0.take().expect(\"Editor should always be initialized\");\n\n        // TODO: Handle multiple strong references somehow\n        let mut internal =\n            Arc::try_unwrap(editor).expect(\"Editor cannot have multiple strong references\");\n\n        // Clear cursor cache\n        let _ = internal\n            .selection\n            .write()\n            .expect(\"Write to cursor cache\")\n            .take();\n\n        let result = f(&mut internal);\n\n        self.0 = Some(Arc::new(internal));\n\n        result\n    }\n}\n\nimpl editor::Editor for Editor {\n    type Font = Font;\n\n    fn with_text(text: &str) -> Self {\n        let mut buffer = cosmic_text::Buffer::new_empty(cosmic_text::Metrics {\n            font_size: 1.0,\n            line_height: 1.0,\n        });","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/iced-rs/iced/blob/2cffa99b395d84fe469b44dccb56bbacd2f1a157/graphics/src/text/editor.rs#L55-L91","documentation":"Error \"Write to cursor cache\" thrown in iced-rs/iced.","triggerScenarios":"Thrown at graphics/src/text/editor.rs:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2cffa99b395d84fe469b44dccb56bbacd2f1a157","analyzedAt":"2026-08-16T19:41:49.083Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}