diff --git a/7.1.259 b/7.1.259 new file mode 100644 index 0000000..fb4fb79 --- /dev/null +++ b/7.1.259 @@ -0,0 +1,61 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.259 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.259 +Problem: Cursor is in the wrong position when 'rightleft' is set, + 'encoding' is "utf-8" and on an illegal byte. (Dominique Pelle) +Solution: Only put the cursor in the first column when actually on a + double-wide character. (Yukihiro Nakadaira) +Files: src/screen.c + + +*** ../vim-7.1.258/src/screen.c Wed Feb 13 21:48:24 2008 +--- src/screen.c Wed Feb 20 14:06:26 2008 +*************** +*** 8045,8053 **** + windgoto(W_WINROW(curwin) + curwin->w_wrow, + W_WINCOL(curwin) + ( + #ifdef FEAT_RIGHTLEFT + curwin->w_p_rl ? ((int)W_WIDTH(curwin) - curwin->w_wcol - ( + # ifdef FEAT_MBYTE +! has_mbyte ? (*mb_ptr2cells)(ml_get_cursor()) : + # endif + 1)) : + #endif +--- 8045,8057 ---- + windgoto(W_WINROW(curwin) + curwin->w_wrow, + W_WINCOL(curwin) + ( + #ifdef FEAT_RIGHTLEFT ++ /* With 'rightleft' set and the cursor on a double-wide ++ * character, position it on the leftmost column. */ + curwin->w_p_rl ? ((int)W_WIDTH(curwin) - curwin->w_wcol - ( + # ifdef FEAT_MBYTE +! (has_mbyte +! && (*mb_ptr2cells)(ml_get_cursor()) == 2 +! && vim_isprintc(gchar_cursor())) ? 2 : + # endif + 1)) : + #endif +*** ../vim-7.1.258/src/version.c Wed Feb 20 13:41:14 2008 +--- src/version.c Wed Feb 20 14:10:23 2008 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 259, + /**/ + +-- +A day without sunshine is like, well, night. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///