mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Bug 141973: Bad cursor position after auto-completion
The line in DOMCompletionContributor.handleVariable() : proposal.setCursorPosition(repString.length() - 1); seems to be copied from previous method handleFunction(). It's reasonable for function (put cursor INSIDE brackets after function name), but useless for variable (it has no trailing brackets, so cursor will stop 1 symbol left from the end on variable name). So mentioned line is removed: default cursor position (set inside of CCompletionProposal constructor) is OK. Oleg Krasilnikov <oleg.krasilnikov@intel.com>
This commit is contained in:
parent
49f74f1cb2
commit
86d252bd88
1 changed files with 0 additions and 3 deletions
|
@ -216,9 +216,6 @@ public class DOMCompletionContributor implements ICompletionContributor {
|
|||
int repLength = completionNode.getLength();
|
||||
int repOffset = offset - repLength;
|
||||
CCompletionProposal proposal = new CCompletionProposal(repString, repOffset, repLength, null, dispString, idString, 1, viewer);
|
||||
|
||||
proposal.setCursorPosition(repString.length() - 1);
|
||||
|
||||
proposals.add(proposal);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue