On Feb 8, 2008 4:00 PM, Yukihiro Nakadaira <[EMAIL PROTECTED]> wrote:
> Bram Moolenaar wrote: > > > > Dominique Pelle wrote: > > > >> Cursor seems to be at incorrect position when > >> using 'binary' and 'rightleft' options. [...] > The cause of the bug is that utf_ptr2cells() returns 4 for an illegal byte. > This patch fix the problem. > > Index: screen.c > =================================================================== > --- screen.c (revision 867) > +++ screen.c (working copy) > @@ -8040,7 +8040,10 @@ > #ifdef FEAT_RIGHTLEFT > curwin->w_p_rl ? ((int)W_WIDTH(curwin) - curwin->w_wcol - ( > # ifdef FEAT_MBYTE > - has_mbyte ? (*mb_ptr2cells)(ml_get_cursor()) : > + /* use 1 for ^X and <hex> */ > + (has_mbyte && ptr2cells(ml_get_cursor()) == 2 > + && vim_isprintc(gchar_cursor())) ? > + 2 : > # endif > 1)) : > #endif Yukihiro, Just to confirm that your patch indeed fixes the bug I reported. Thanks -- Dominique --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
