Christian wrote:

> > > Patch 8.2.2933
> > > Problem:    When 'clipboard' is "unnamed" zp and zP do not work correctly.
> > > Solution:   Pass -1 to str_to_reg() and fix computing the character width
> > >             instead of using the byte length. (Christian Brabandt,
> > >             closes #8301, closes #8317)
> > > Files:      src/clipboard.c, src/mbyte.c, src/register.c
> > 
> > I thought the ASAN error was fixed, but apparently it isn't...
> 
> No sorry, it wasn't but I still don't know what is causing this. BTW: it 
> might make sense to only call mb_charlen_len when we actually need to 
> calculate the width, not generally always.

I managed to reproduce the error with valgrind using test_quotestar.
Instead of getting the length of the line, I used the length of each
character.  Also fixed counting cells intead of characters.  No more
ASAN error.

We could indeed check for MBLOCK to avoid overhead.

-- 
If you only have a hammer, you tend to see every problem as a nail.
If you only have MS-Windows, you tend to solve every problem by rebooting.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202106041717.154HHY7e3162405%40masaka.moolenaar.net.

Raspunde prin e-mail lui