Skip to content

Commit 2174aca

Browse files
committed
Check for workspace root in runnable codelens
1 parent 8661740 commit 2174aca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rust-analyzer/src/to_proto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ pub(crate) fn code_lens(
11641164
let r = runnable(snap, run)?;
11651165

11661166
let lens_config = snap.config.lens();
1167-
if lens_config.run && client_commands_config.run_single {
1167+
if lens_config.run && client_commands_config.run_single && r.args.workspace_root.is_some() {
11681168
let command = command::run_single(&r, &title);
11691169
acc.push(lsp_types::CodeLens {
11701170
range: annotation_range,

0 commit comments

Comments
 (0)