Cade Foster wrote:

> This patch prevent delete part of multi-byte character.
> 
> Steps to reproduce bug:
> 
> 1) start vim (console or GUI):
> 
> vim -u NONE -U NONE --noplugin -i NONE -n
> 
> Note:
> LANG is "en_US.UTF-8"
> TERM is "linux"
> vim version 7.4 with patches 1-183
> 
> 2) type any multi-byte character, for example, alpha:
> 
> i<C-k>a*
> 
> type newline and leave insert mode:
> 
> <cr><Esc>
> 
> 3) type:
> 
> :set whichwrap=h<cr>
> 
> Results:
> line 1: α
> line 2: <Cursor_here>
> line 3: ~
> line 4: ~
> ...
> 
> 4) type
> 
> dh
> 
> Actual results:
> line 1: <ce>
> line 2: ~
> line 3: ~
> ...
> 
> Expected results:
> line 1: α
> line 2: ~
> line 3: ~
> ...
> 

Thanks for the fix!  It needs a check for has_mbyte, but I can fix that
easily.

-- 
    [clop clop]
ARTHUR:  Old woman!
DENNIS:  Man!
ARTHUR:  Man, sorry.  What knight lives in that castle over there?
DENNIS:  I'm thirty seven.
ARTHUR:  What?
DENNIS:  I'm thirty seven -- I'm not old!
                                  The Quest for the Holy Grail (Monty Python)

 /// 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/groups/opt_out.

Raspunde prin e-mail lui