OSDN Git Service

C++: Improve completion assist
authorYuchen Deng <loaden@gmail.com>
Tue, 11 Oct 2011 01:29:48 +0000 (09:29 +0800)
committerLeandro T. C. Melo <leandro.melo@nokia.com>
Mon, 17 Oct 2011 10:22:00 +0000 (12:22 +0200)
commit4ea9c2193210d2ce87722085aa4ad7cc3057c405
treef64fca619c212f0418d767983fe3d8f7fad9db50
parent3f01f551bdcc22fec37c502da6379d119732c3dc
C++: Improve completion assist

Avoid inserting characters that are already there.
e.g.
int testFly() {}
te|Fly()
When triggers a completion, the code will changed to:
testFly()|
But in before, the code will changed to:
testFly()|Fly()

Notice:  Character of '|' show the cursor position.

Change-Id: I6c111e30356b2549aebc6fbea05608e70d6ab41f
Merge-request: 398
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
src/plugins/cpptools/cppcompletionassist.cpp