junichi11 commented on code in PR #5885:
URL: https://github.com/apache/netbeans/pull/5885#discussion_r1176512858
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/PHPCodeCompletion.java:
##########
@@ -358,10 +360,11 @@ public CodeCompletionResult
complete(CodeCompletionContext completionContext) {
}
request.extraPrefix = searchPrefix;
+ int prefixLengthForAnchor = queryType == QueryType.DOCUMENTATION ?
prefixUntilCaret.length() : prefix.length();
request.anchor = caretOffset
// can't just use 'prefix.getLength()' here cos it might have
been calculated with
// the 'upToOffset' flag set to false
- - prefix.length();
+ - prefixLengthForAnchor;
Review Comment:
Then
```suggestion
- prefixUntilCaret.length();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists