Skip to content

Instantly share code, notes, and snippets.

@k-takata
Created June 16, 2014 13:18
Show Gist options
  • Save k-takata/d9be056d6a54a3c9926d to your computer and use it in GitHub Desktop.
Save k-takata/d9be056d6a54a3c9926d to your computer and use it in GitHub Desktop.
diff --git a/autoload/vimproc.vim b/autoload/vimproc.vim
index bb79a8c..543af50 100644
--- a/autoload/vimproc.vim
+++ b/autoload/vimproc.vim
@@ -884,10 +884,8 @@ function! s:read(...) dict "{{{
" return s:hd2str([hd])
endfunction"}}}
function! s:read_lines(...) dict "{{{
- let res = self.buffer
-
- let outs = []
- while !self.eof && stridx(res, "\n") < 0
+ let outs = [self.buffer]
+ while !self.eof && stridx(outs[-1], "\n") < 0
let out = call(self.read, a:000, self)
if out == ''
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment