Autocomplete deletes a line on pressing TAB
Hi,
We are developing a custom language plugin for IntelliJ with autocomplete support.
For InsertionContext in handleInsert(), the completion character is set to "\n" and addCompletionChar is set to false. While using the plugin, when the user presses TAB on an autocomplete option, a line is getting deleted. When user presses ENTER, that's not the case. What could be causing this issue?
Please sign in to leave a comment.
When Tab is pressed, the part of the identifier or the reference after the caret is deleted. You can debug which code invokes com.intellij.codeInsight.completion.CompletionInitializationContext#setReplacementOffset and sets the offset after the line end there.