Skip to content

Commit

Permalink
Fix Run lens showing when lenses are disabled
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hermannm committed May 2, 2024
1 parent b05f906 commit d09331c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit d09331c

Please sign in to comment.