diff --git a/helix-term/src/ui/context.rs b/helix-term/src/ui/context.rs index 5b5278ad3..5e2e6cf19 100644 --- a/helix-term/src/ui/context.rs +++ b/helix-term/src/ui/context.rs @@ -73,7 +73,10 @@ pub fn calculate_sticky_nodes( config: &helix_view::editor::Config, cursor_cache: &Option>, ) -> Option> { - let cursor_cache = cursor_cache.expect("cursor is cached")?; + let Some(cursor_cache) = cursor_cache else { + return None; + }; + let cursor_cache = cursor_cache.as_ref()?; let syntax = doc.syntax()?; let tree = syntax.tree();