From 572da4e820e26e0f874acc1de2c82009f8dccb3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr>
Date: Fri, 9 Feb 2024 16:00:50 +0100
Subject: [PATCH] [Ivette] Fixes Studia search mode, which can accept any
 marker.

---
 ivette/src/frama-c/plugins/studia/index.ts | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/ivette/src/frama-c/plugins/studia/index.ts b/ivette/src/frama-c/plugins/studia/index.ts
index 31b54d9e2b2..aa612159e26 100644
--- a/ivette/src/frama-c/plugins/studia/index.ts
+++ b/ivette/src/frama-c/plugins/studia/index.ts
@@ -129,12 +129,9 @@ const studiaWritesMode : Ivette.ModeProps = {
 
 async function onEnter(akind: access, term: string): Promise<void> {
   const stmt = States.getSelected();
-  const { kind: mkind } = States.getMarker(stmt);
-  if (mkind === 'STMT') {
-    const marker = await Server.send(Ast.parseLval, { stmt, term })
-      .catch(handleError);
-    if (marker) computeStudiaSelection(akind, marker, term);
-  }
+  const marker = await Server.send(Ast.parseLval, { stmt, term })
+    .catch(handleError);
+  if (marker) computeStudiaSelection(akind, marker, term);
 }
 
 Ivette.registerMode(studiaReadsMode);
-- 
GitLab