Error message when execute "JCimportSort" command
carlsonsantana opened this issue · comments
Actual behavior (Required!)
Vim show an error message when execute "JCimportSort" command first time, but execute the command. This error only occurs in one project, others work without errors.
Expected behavior (Required!)
Not show the error message in any project.
The steps to reproduce actual behavior (Required!)
- Open a Java file;
- Go to command mode;
- Execute command
JCimportSort
Environment (Required!)
- OS: Linux
- Vim version: 8.2
The output of :redir and :message (Optional)
Error detected while processing /home/carlson/.vim/plugins/vim-javacomplete2/autoload/javacomplete/imports.vim[316]..function javacomplete#util#GetRegularClassesDict:
line 10:
E684: list index out of range: -1
E116: Invalid arguments for function extend
My own fix
To fix this error I edited the file autoload/javacomplete/util.vim
and surround by if clause with class != ''
condition.
May be you can make PR?