On Wed, Nov 4, 2009 at 5:04 PM, Lech Lorens <[email protected]> wrote:
> The right shift of a block is not performed well in certain situations
> if 'enc' is set to a multi-byte value.
>
> Observe it by editing a file with the following contents in Vim (1 and
> 2 are line numbers, not the contents of the file):
>
> #v+
> 1 s|
> 2  |
> #v-
>
> $ vim -u NONE -U NONE --noplugin file.txt
>
> :set enc=utf-8 number list listchars=tab:>-
> :1
> :normal 2|
> :normal  j>gv>

I think this is supposed to be

  :exe "normal \<C-v>j>gv>"

Similarly for the other example.

|v_b_>_example| exhibits a similar issue, but it also results in a
character being deleted from the text!

Given a file that contains the following 4 lines, run in a UTF-8
environment or setting 'enc' to UTF-8:

abcdefghijklmnopqrstuvwxyz
abc             defghijklmnopqrstuvwxyz
abcdef  ghi             jklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz

vim -u NONE -c 'set list listchars=tab:>-' test.txt
:exe "normal fo\<C-v>3j>"

will result in

abcdefghijklmn        opqrstuvwxyz
abc                     efghijklmnopqrstuvwxyz
abcdef  ghi             jklmnopqrstuvwxyz
abcdefghijklmn        opqrstuvwxyz

The d on line 2 has disappeared and line 3 wasn't shifted at all.

Does your patch also fix this situation, Lech?  I'm unable to test
right now.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui