From d70e7ec06627193f5d21c829ec25e9874a9c4a23 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 7 Dec 2023 09:22:19 +0100 Subject: [PATCH] fix bug in hooks... ...that prevented the language server from seing inner statements of functions --- mers_lib/src/program/run/chain.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mers_lib/src/program/run/chain.rs b/mers_lib/src/program/run/chain.rs index a352a85..ac9a619 100755 --- a/mers_lib/src/program/run/chain.rs +++ b/mers_lib/src/program/run/chain.rs @@ -27,7 +27,9 @@ impl MersStatement for Chain { return Err("can't init to statement type Chain".to_string().into()); } let prev_enable_hooks = info.global.enable_hooks; - info.global.enable_hooks = false; + if self.as_part_of_include.is_some() { + info.global.enable_hooks = false; + } let arg = self.first.check(info, None)?; let func = self.chained.check(info, None)?; info.global.enable_hooks = prev_enable_hooks;