Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent buffering of job output and excessive polling (#4259)
When 'close_cb' is set for job_start(), but out_cb or err_cb isn't, vim buffers data instead of dropping it (in case someone wanted to read and process it in close_cb), and additionally polls for new data every 10 milliseconds, causing excessive wakeups and CPU usage. Since we don't read the data anywhere outside of out_cb/err_cb, any LSP that prints an error to stderr triggers this and vim keeps spinning until :ALEStopAllLSPs. Fix this by always setting both callbacks, thus dropping any data we're not interested in. See vim/vim#10758 for an upstream report of the excessive polling. It's possible this is intentional, I dunno. Fixes: b42153e ("Fix #4098 - Clear LSP data when servers crash")
- Loading branch information