Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Bug #141973 Bad cursor position after auto-completion

Created an attachment (id=43345) with patch for this problem:
 --> (https://bugs.eclipse.org/bugs/attachment.cgi?id=43345&action=view)

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 and
equal to whole "replacementString" length) is OK.

-----------------------------------
With best regards, Oleg Krasilnikov
Software designer, Eclipse team. 
Intel corp.
+7 8312 162 444 ext. 2587 
(Russia, Nizhny Novgorod)


Back to the top