joonty / vim-phpqa

PHP QA tools for Vim
http://www.joncairns.com
MIT License
290 stars 32 forks source link

Incompatible with vim-fugitive plugin #41

Open still-dreaming-1 opened 8 years ago

still-dreaming-1 commented 8 years ago

If I have vim-phpqa and vim-fugitive installed, a feature of vim-fugitive does not work. I run the :Gstatus command in a scenario where the status buffer will show an unstaged, modified php file. Move the cursor to that file, and then press D. This tries to run something similar to vim difftool on the latest version of the file and the checkout version of the file. Some windows open up, and the window that is supposed to show the the checked out version of the file with highlighted differences instead shows this phpqa related error message:

"www/ACSmanager/AcceptManuallyEnteredAmr.php" 44L, 2009C                                                                                                                                      
Error detected while processing function Phpqa#PhpLint:                                                                                                                                       
line    8:                                                                                                                                                                                    
E684: list index out of range: 0                                                                                                                                                              
E116: Invalid arguments for function match(l:php_list[0],"No syntax errors") == -1                                                                                                            
E15: Invalid expression: 0 != v:shell_error && match(l:php_list[0],"No syntax errors") == -1

Happening in the latest version of Neovim. Something similar happens in an older version of Vim I tested. I have the latest version of vim-phpqa and vim-fugitive.

still-dreaming-1 commented 8 years ago

Here is what the vim-fugitive maintainer had to say: https://github.com/tpope/vim-fugitive/issues/754#issuecomment-189767352

If phpqa is blowing up it's because phpqa made some assumptions that don't hold true for fugitive buffers.

PickRelated commented 8 years ago

Totally confirm. Makes huge pain in the booty for me. Each time I want to see a git diff, I have to turn phpqa off and reboot vim. Then not to forget turn it back on before committing.

PickRelated commented 8 years ago

But why complain? Created a pull request with a fix. :) Please, check it out.