Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Krasilnikov2006-06-05 13:42:58 +0000
committerOleg Krasilnikov2006-06-05 13:42:58 +0000
commit86d252bd88dcbfb62cd95e8d4ad40d43036418ae (patch)
tree46c47b5391c79b47a3e0424db6792ba01a4baf20
parent49f74f1cb2de9ae3fbf0241bc0e318e5ba415c54 (diff)
downloadorg.eclipse.cdt-86d252bd88dcbfb62cd95e8d4ad40d43036418ae.tar.gz
org.eclipse.cdt-86d252bd88dcbfb62cd95e8d4ad40d43036418ae.tar.xz
org.eclipse.cdt-86d252bd88dcbfb62cd95e8d4ad40d43036418ae.zip
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>
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/DOMCompletionContributor.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/DOMCompletionContributor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/DOMCompletionContributor.java
index 61ada144b2..28deb369d9 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/DOMCompletionContributor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/DOMCompletionContributor.java
@@ -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);
}

Back to the top