diff --git a/src/plugins/wp/ProverWhy3.ml b/src/plugins/wp/ProverWhy3.ml
index ea4bc9329a43bd18eaf0c2b6ff25e17137c9615c..b71a4378c186dc59df8bc2eea6b1cddcbc28ad2c 100644
--- a/src/plugins/wp/ProverWhy3.ml
+++ b/src/plugins/wp/ProverWhy3.ml
@@ -1406,7 +1406,9 @@ let editor_mutex = Task.mutex ()
 let editor_command pconf =
   let config = Why3Provers.config () in
   try
-    let ed = Why3.Whyconf.editor_by_id config pconf.Why3.Whyconf.editor in
+    let prover = pconf.Why3.Whyconf.prover in
+    let ed_id = Why3.Whyconf.get_prover_editor config prover in
+    let ed = Why3.Whyconf.editor_by_id config ed_id in
     String.concat " " (ed.editor_command :: ed.editor_options)
   with Not_found ->
     Why3.Whyconf.(default_editor (get_main config))