Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not get stdout when io is running #431

Open
wsdjeg opened this issue Sep 22, 2019 · 1 comment
Open

can not get stdout when io is running #431

wsdjeg opened this issue Sep 22, 2019 · 1 comment

Comments

@wsdjeg
Copy link

wsdjeg commented Sep 22, 2019

same issue as neovim/neovim#1592

as the NOTE of neovim's job saied:

  Note: Buffered stdout/stderr data which has not been flushed by the sender
  will not trigger the on_stdout/on_stderr callback (but if the process
  ends, the on_exit callback will be invoked).
        For example, "ruby -e" buffers output, so small strings will be
        buffered unless "auto-flushing" ($stdout.sync=true) is enabled. >
          function! Receive(job_id, data, event)
            echom printf('%s: %s',a:event,string(a:data))
          endfunction
          call jobstart(['ruby', '-e',
            \ '$stdout.sync = true; 5.times do sleep 1 and puts "Hello Ruby!" end'],
            \ {'on_stdout': 'Receive'})

how about enable autoflush in io?

@stevedekorte
Copy link
Member

stevedekorte commented Sep 22, 2019

I’d pull that commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants