Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

fix completion for empty prefix #104

Closed

Conversation

milahu
Copy link
Contributor

@milahu milahu commented Oct 9, 2022

fix #103

before:
with empty prefix, the TextEdit range was wrong

mostly copy-paste of the let mut completions = Vec::new(); branch, except

                     text_edit: Some(CompletionTextEdit::Edit(TextEdit {
-                        range: utils::range(content, node.node().text_range()),
+                        range: Range {
+                            start: params.position,
+                            end: params.position,
+                        },
                         new_text: var.clone(),
                     })),

maybe refactor the 2 branches?

@aaronjanse
Copy link
Member

Closed upon request of PR author

@aaronjanse aaronjanse closed this Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autocompletion is not working in vscode: no suggestions
2 participants