[PATCH] readfile() could not read a file if the file contains only one line without an NL at the end

2011-03-26 Thread H Xu
Hello, To reproduce: :!echo -n 'Hello' >temp.txt :echo readfile('temp.txt') Then an empty list is displayed rather than the content of this file. The attached patch fixes this problem. Regards, Hong Xu 2011/3/26 -- You received this message from the "vim_dev" maillist. Do not top-post! Type y

Re: [PATCH] readfile() could not read a file if the file contains only one line without an NL at the end

2011-03-26 Thread ZyX
Reply to message «[PATCH] readfile() could not read a file if the file contains only one line without an NL at the end», sent 10:48:53 26 March 2011, Saturday by H Xu: > To reproduce: > :!echo -n 'Hello' >temp.txt > :echo readfile('temp.txt') > > Then an e

Re: [PATCH] readfile() could not read a file if the file contains only one line without an NL at the end

2011-03-26 Thread H Xu
On 2011/3/26 15:48, H Xu wrote: Hello, To reproduce: :!echo -n 'Hello' >temp.txt :echo readfile('temp.txt') Then an empty list is displayed rather than the content of this file. The attached patch fixes this problem. Regards, Hong Xu 2011/3/26 Hello, The last patch has some problem. Use t

Re: [PATCH] readfile() could not read a file if the file contains only one line without an NL at the end

2011-03-26 Thread H Xu
On 2011/3/26 18:38, H Xu wrote: On 2011/3/26 15:48, H Xu wrote: Hello, To reproduce: :!echo -n 'Hello' >temp.txt :echo readfile('temp.txt') Then an empty list is displayed rather than the content of this file. The attached patch fixes this problem. Hello, The last patch has some problem.

Re: [PATCH] readfile() could not read a file if the file contains only one line without an NL at the end

2011-03-26 Thread Bram Moolenaar
Hong Xu wrote: > On 2011/3/26 15:48, H Xu wrote: > > Hello, > > > > To reproduce: > > :!echo -n 'Hello' >temp.txt > > :echo readfile('temp.txt') > > > > Then an empty list is displayed rather than the content of this file. > > > > The attached patch fixes this problem. > > > > Regards, > > Hong X