company-irony
company-irony copied to clipboard
Incorrect cursor position aftern 'return' keyword completion
After completion of keyword 'return', looks like cursor position is incorrect:
int f(void)
{
// before completion
retu<complete here>
}
// after completion
return expression<cursor is here>
I need to delete 'expression' manually after completion.
Indeed, with yasnippet enabled the behavior is correct, that is expression is interpreted as a placeholder.
However, without yasnippet things aren't right.
It looks like I'm using company-template-c-like-templatify
whose guess logic does not work right in this case. irony-completion-at-point
works ok in this situation.
Not sure what to do, maybe company should be fixed, or irony has things that company does not, and irony should work around it.
A quick fix could be to not call company-template-c-like-templatify if there is no parentheses or square brakets, which is what company-template-c-like-templatify supports I think.
Thanks. With yas-minor-mode, everything works well.