shawncplus/phpcomplete.vim

call class show "List index out of range" in E684

Opened this issue · 4 comments

hi,

Sometimes when i try to call class function, such as :: or ->, the phpcomplete will slow down the vim windows and make the system slowly, It's OK because i ctags lots of projects.

But when i use iteration call, e.g. "DB->query()->", I want to call "toSql()" and the example will be
"DB->query()->toSql()", The phpcomplete will crash the loop the error
"Deal function phpcomplete#CompletePHP..phpcomplete#GetClassName..phpcomplete#GetClassName..phpcomplete#GetClassName" Error
"E684: List index out of range".

any idea? or could you add another variables so we can disable GetClassName like the
let g:phpcomplete_complete_for_unknown_classes = 0

BTW, I use linux debian stable, vim version 7.4.488

Thanks.

Can you maybe post a sample project / ctags file that exposes this problem? Unfortunately the GetClassName method is quite huge, it's hard to find it without a way to reproduce.
For start, do you have a line number for the error (somewhere it should be written when the error occurs).

Thanks @complex857, here is the screenshot
2
and the loop output
1

  • the code snippets. I deleted all tags file to avoid this, but get same error.
    3

Sorry @rainysia for the late reply, but I didn't managed to recreate this just by typing the code example on the screenshot into a buffer (tried to make up a class that have these stuff and such).
Can you send me an actual zip file or something with the code in it where i can just hit ctrl+xo and get the error?
I'm afraid just by the error messages I'm still at loss for ideas what could be the bug.