From d99a121ca854c9c2a5407159a1087395dd9c7a67 Mon Sep 17 00:00:00 2001 From: SoraTenshi Date: Mon, 18 Mar 2024 00:17:48 +0100 Subject: [PATCH] Track view ids to not render sc on other splits --- helix-term/src/ui/context.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helix-term/src/ui/context.rs b/helix-term/src/ui/context.rs index 20e1b3858..4226522ae 100644 --- a/helix-term/src/ui/context.rs +++ b/helix-term/src/ui/context.rs @@ -107,6 +107,10 @@ pub fn calculate_sticky_nodes( let mut cached_nodes = build_cached_nodes(nodes, view, &mut context, text).unwrap_or(Vec::new()); + if cached_nodes.iter().any(|node| node.view_id != view.id) { + cached_nodes.clear(); + } + let start_byte_range = cached_nodes .last() .unwrap_or(&StickyNode::default())