Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty strings are not respected in textEdits #218

Closed
Trias opened this issue Sep 23, 2020 · 1 comment · Fixed by #234
Closed

empty strings are not respected in textEdits #218

Trias opened this issue Sep 23, 2020 · 1 comment · Fixed by #234

Comments

@Trias
Copy link
Contributor

Trias commented Sep 23, 2020

Description:
When supplying an empty string in an textEdit (for example in a completion), the text edit is ignored by lsp4intellij. It is therefore impossible to delete text via a textedit.

Empty strings is specifically prevented by lsp4intellij in https://github.com/ballerina-platform/lsp4intellij/blob/master/src/main/java/org/wso2/lsp4intellij/editor/EditorEventManager.java#L1132, but i cannot see the reason for it, especially as there is code later on to handle empty strings. In my testing i did not found any problems. Is it safe to remove the check?

@NipunaRanasinghe
Copy link
Contributor

@Trias I'm afraid this check could be an LSP violation, as like you mentioned, empty string should be allowed in order to delete text via text edits. Thanks for you observation and feel free to send a PR with the fix 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants