We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28f6b5b commit 4a3a525Copy full SHA for 4a3a525
crates/rust-analyzer/src/to_proto.rs
@@ -639,14 +639,15 @@ fn main() <fold>{
639
}
640
641
pub(crate) fn code_action(world: &WorldSnapshot, assist: Assist) -> Result<lsp_ext::CodeAction> {
642
- let res = if assist.source_change.is_snippet {
+ let res = if assist.source_change.cursor_position.is_none() {
643
lsp_ext::CodeAction {
644
title: assist.label,
645
kind: Some(String::new()),
646
edit: Some(snippet_workspace_edit(world, assist.source_change)?),
647
command: None,
648
649
} else {
650
+ assert!(!assist.source_change.is_snippet);
651
let source_change = source_change(&world, assist.source_change)?;
652
let arg = serde_json::to_value(source_change)?;
653
let title = assist.label;
0 commit comments