On Monday, September 4, 2017 at 3:01:53 AM UTC-4, Christian Brabandt wrote:
> On Mo, 04 Sep 2017, Manuel Ortega wrote:
> 
> > 8.0.1039 broke setline().  I know this by bisection.  To reproduce:
> > 
> > Make a file, testvimrc, that contains one line: "source foo".
> > 
> > Create the file "foo", and let it contain only the following:
> > 
> >   call setline(1, "Hello There")
> > 
> > To show the bug, do: vim -u testvimrc -u NONE -N
> > 
> > Expected behavior, which was also the actual behavior before 8.0.1039:  I 
> > see a
> > new buffer with "Hello There" on the first line.
> > 
> > Actual behavior: after 8.0.1039: I see no text whatsoever in the buffer.
> > 
> > This is on macOS 10.12.6.
> 
> I see the problem. There is a new check for buf->b_ml.ml_mfp == NULL in 
> set_buffer_lines that wasn't there previously and this was no problem 
> before, because ml_replace would open the buffer if ml_mfp would be 
> null. I think we can safely change this check to:
[snip]
> 
> or perhaps even completely remove the check. Not sure if this however 
> will break in some situations, but at least I could not break it using
> 
>     :call setbufline(5, 1, 'foobar')
> 
> in the startupfile (when buffer number 5 does not exist yet.

Thanks, I'll try this out.

Sorry that my reproduction case was not maximally simple.  One can (with the 
same files defined above)  just do "vim -u foo -N" and the difference beteen 
8.0.1039 and its predecessors will be apparent.

-Manny

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui