Tony wrote:

> On Wed, Dec 5, 2018 at 7:46 PM Bram Moolenaar <[email protected]> wrote:
> >
> >
> > Patch 8.1.0565
> > Problem:    Asan complains about reading before allocated block.
> > Solution:   Workaround: Avoid offset from becoming negative.
> > Files:      src/gui.c
> [...]
> > !           // FIXME: how can the first character ever be zero?
> > !           if (col1 > 0 && ScreenLines[off + col1] == 0)
> >                 --col1;
> [...]
> 
> Experiment shows that after yanking a block from an empty buffer (i.e.
> the ruler says "0,0-1") with 'virtualedit' defaulted to empty, the
> register yanked to is empty. Doesn't that mean that the
> string-terminating null byte is found at character zero of the block?
> 
> Of course, one would normally not yank from an empty buffer — except,
> maybe, to test that the program logic is working properly, even in the
> most absurd circumstances.

This is using ScreenLines[], which should contain spaces where the
display is blank.  Has nothing to do with register content or what text
is stored in the buffer.

-- 
Kiss me twice.  I'm schizophrenic.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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