On Wed Aug 06 2014 at 下午10:27:16 mattn <[email protected]> wrote:

> Hi list.
>
> -----------------
> aaa
> あああ
> bbb
> -----------------
>
> When type: gg0l<C-V>jjIx<Esc> in the buffer above, result should be:
>
> -----------------
> axaa
> xあああ
> bxaa
> -----------------
>
> Because visual block select first letter in second line.
>
> http://go-gyazo.appspot.com/ff56afa0c9e03c34.png
>
> But currently, vim breaks multi-byte characters.
>
> -----------------
> axaa
>  x <81><82>ああ
> bxbb
> -----------------
>

What's your internal encoding? I can't reproduce with encoding set as
"utf-8". There's no broken multi-byte character as in your case, but I do
see an extra white space at the beginning of the second line.

Could you please help make sure that your change can fix that problem as
well? Thanks!


>
>
> diff -r 2a798dca16bf src/ops.c
> --- a/src/ops.c Wed Aug 06 19:09:16 2014 +0200
> +++ b/src/ops.c Thu Aug 07 14:23:10 2014 +0900
> @@ -609,6 +609,25 @@
>             }
>         }
>
> +#ifdef FEAT_MBYTE
> +       if (has_mbyte && spaces > 0)
> +       {
> +           if (b_insert)
> +           {
> +               int off = (*mb_head_off)(oldp, oldp + offset + spaces);
> +               spaces -= off;
> +               count -= off;
> +           }
> +           else
> +           {
> +               int off = (*mb_off_next)(oldp, oldp + offset);
> +               offset += off;
> +               spaces = 0;
> +               count = 0;
> +           }
> +       }
> +#endif
> +
>         newp = alloc_check((unsigned)(STRLEN(oldp)) + s_len + count + 1);
>         if (newp == NULL)
>             continue;
>
> --
> --
> 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.
>

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