m2mdas / phpcomplete-extended

A fast, extensible, context aware autocomplete plugin for PHP composer projects with code inspection features.
MIT License
216 stars 23 forks source link

STDOUT of PHP is placed directly at the cursor position of the current buffer #32

Closed mkraemer closed 10 years ago

mkraemer commented 10 years ago

Hi,

when saving a file which contains syntax errors, the resulting STDOUT of php is just placed directly at the current cursor position of the buffer: screenshot

I'm not too sure this is a problem with phpcomplete-extended or maybe a general issue with my vim config, but i'd be very grateful if you could push me in the right direction here :)

thx

lovek323 commented 10 years ago

No, I'm having the same issue.

m2mdas commented 10 years ago

Sorry for late reply. I haven't been able to give time lately. I will look into it this weekend. In the mean time can you isolate your environment with only phpcomplete-* and it's dependent plugins enabled using the procedure listed here and check that the bug can be regenerated?

mkraemer commented 10 years ago

Thank you for your reply :)

Yes, i can recreate the problem using the following .vimrc:

set nocompatible
filetype off

set rtp^=~/.vim/bundle/vimproc.vim
set rtp^=~/.vim/bundle/phpcomplete-extended
set rtp^=~/.vim/bundle/phpcomplete-extended-symfony

filetype plugin indent on

Again, thank you :) Cheers

m2mdas commented 10 years ago

In before STDERR output was not redirected to /dev/null for background update index command. I assume you are using vim in terminal so error message was printed in the vim buffer. I did not catch the issue before because I use gVim and aliased it to redirect it's warning messages to /dev/null. Pushed a fix. Please update and check that it is working for you.

mkraemer commented 10 years ago

Awesome, the redirection of stderr fixes the problem, thank you :)

Unfortunately, the closing quote of the cmd-line was dropped in your commit:

let cmd .= ' 1>/dev/null 2>/dev/null

instead of

let cmd .= ' 1>/dev/null 2>/dev/null'

Other than that, the issue is fixed, thank you :)

m2mdas commented 10 years ago

Ooops, sorry for silly mistake. Pushed the fix. Thank you :)

m2mdas commented 10 years ago

I should concentrate more. Even my commit message was wrong. Sorry again :)