From d226527a8c83f564e8a013d615fe488a9ed7360a Mon Sep 17 00:00:00 2001 From: hermannm Date: Thu, 2 May 2024 20:12:28 +0200 Subject: [PATCH] Fix Run lens showing when lenses are disabled The documentation for `lens.run.enable` states that it only applies when `lens.enable` is set. However, the config setting whether to show the Run lens did not check `lens.enable`, so the Run lens would show even though lenses were disabled. --- crates/rust-analyzer/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 9b8fdd810614..e16595c992eb 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -1776,7 +1776,7 @@ impl Config { pub fn lens(&self) -> LensConfig { LensConfig { - run: *self.lens_run_enable(), + run: *self.lens_enable() && *self.lens_run_enable(), debug: *self.lens_enable() && *self.lens_debug_enable(), interpret: *self.lens_enable() && *self.lens_run_enable() && *self.interpret_tests(), implementations: *self.lens_enable() && *self.lens_implementations_enable(),