Closed tuhdo closed 10 years ago
This is the intended behavior.
viable_color
appears because it's in the function find_redundant_color
.
While it could be possible to remove it, I chose not to so far.
The reason is that C++ is a complex language and current CEDET parser becomes
helpless with intricate C++ code (such as heavy templates, or indirection).
That's why i choose to provide as many completion candidates as possible, even if some
of them are wrong. Otherwise in some situations you would get zero candidates.
The behavior of moo-complete
is to complete up to longest common prefix, if it's
one of the candidates, which is the case here with viable_color
and viable_colors
.
Invoking moo-complete
the second time after the longest common prefix has been filled
in is also the intended behavior.
You can use CEDET's standard semantic-ia-complete-symbol
in place of moo-complete
.
It has the behavior that you want.
Ok got it. You should update the documentation on moo-complete
to avoid future confusions. Thanks.
You can get the same files in this issue: https://github.com/abo-abo/function-args/issues/7
I tried to complete
viable_colors
insolve()
function (the first function in the cpp file). Butmoo-complete
gave meviable_color
, while in the current function (that the cursor is in) or the included files has no such variable.viable_color
is the variable used in other functions.How to reproduce:
viable
then usemoo-complete
.viable
changes toviable_color
. It is supposed to beviable_colors
(with 's')moo-complete
again onviable_color
. This time a list of candidates appears withviable_color
as prefix.