You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
The Serenata server generates autocompletion suggestions that carry a textEdit property that can replace characters, for example:
<?php/** * @inh */
In this docblock, with the cursor after the @inh text, a suggestion with text @inheritDoc is generated, which includes a textEdit that includes the range of the existing @inh text to ensure it is replaced in its entirety, along with the @ sign.
Currently, this @ sign is not replaced and the result of selecting the completion is:
<?php/** * @@inheritDoc */
I did some digging and it turns out that the AutocompleteAdapter first properly resolves the textEdit to the replacementPrefix of value @. However, afterwards, that (correct) replacementPrefix is then trampled and overwritten by this code in AutocompleteAdapter::getSuggestions:
// As the user types more characters to refine filter we must replace those characters on acceptanceconstreplacementPrefix=(triggerChar!==''&&triggerOnly) ? '' : request.prefix;for(constsuggestionofsuggestions){suggestion.replacementPrefix=replacementPrefix;}
This resets the replacementPrefix of @ to an empty value and seems to be the cause of the double @ symbol being inserted.
The text was updated successfully, but these errors were encountered:
The Serenata server generates autocompletion suggestions that carry a
textEdit
property that can replace characters, for example:In this docblock, with the cursor after the
@inh
text, a suggestion with text@inheritDoc
is generated, which includes atextEdit
that includes the range of the existing@inh
text to ensure it is replaced in its entirety, along with the@
sign.Currently, this
@
sign is not replaced and the result of selecting the completion is:I did some digging and it turns out that the
AutocompleteAdapter
first properly resolves thetextEdit
to thereplacementPrefix
of value@
. However, afterwards, that (correct)replacementPrefix
is then trampled and overwritten by this code inAutocompleteAdapter::getSuggestions
:This resets the
replacementPrefix
of@
to an empty value and seems to be the cause of the double@
symbol being inserted.The text was updated successfully, but these errors were encountered: