Skip to content

Instantly share code, notes, and snippets.

@k-takata
Created June 11, 2014 10:58
Show Gist options
  • Save k-takata/ab9ded0fb2ea0c48182c to your computer and use it in GitHub Desktop.
Save k-takata/ab9ded0fb2ea0c48182c to your computer and use it in GitHub Desktop.
--- a/autoload/vimproc.vim
+++ b/autoload/vimproc.vim
@@ -857,10 +857,10 @@ function! s:read(...) dict "{{{
let timeout = get(a:000, 1, s:read_timeout)
let max = 100
- let hd = ''
+ let hds = []
for cnt in range(1, max)
let [hd_r, eof] = self.f_read(number, timeout/max)
- let hd .= hd_r
+ let hds += [hd_r]
if eof
break
@@ -870,6 +870,7 @@ function! s:read(...) dict "{{{
let self.eof = eof
let self.__eof = eof
+ let hd = join(hds, '')
return hd == '' ? '' :
\ vimproc#util#has_lua() ?
\ s:hd2str_lua([hd]) : s:hd2str([hd])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment