@@ -1535,7 +1535,8 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
15351535 {
15361536 if (hasFolding (oap -> start .lnum , & oap -> start .lnum , NULL ))
15371537 oap -> start .col = 0 ;
1538- if (hasFolding (curwin -> w_cursor .lnum , NULL ,
1538+ if ((curwin -> w_cursor .col > 0 || oap -> inclusive )
1539+ && hasFolding (curwin -> w_cursor .lnum , NULL ,
15391540 & curwin -> w_cursor .lnum ))
15401541 curwin -> w_cursor .col = (colnr_T )STRLEN (ml_get_curline ());
15411542 }
@@ -6001,8 +6002,7 @@ nv_right(cmdarg_T *cap)
60016002 else
60026003 {
60036004 if (has_mbyte )
6004- curwin -> w_cursor .col +=
6005- (* mb_ptr2len )(ml_get_cursor ());
6005+ curwin -> w_cursor .col += (* mb_ptr2len )(ml_get_cursor ());
60066006 else
60076007 ++ curwin -> w_cursor .col ;
60086008 }
@@ -7400,13 +7400,7 @@ nv_optrans(cmdarg_T *cap)
74007400 {
74017401 if (cap -> count0 )
74027402 stuffnumReadbuff (cap -> count0 );
7403- // If on an empty line and using 'x' and "l" is included in the
7404- // whichwrap option, do not delete the next line.
7405- if (cap -> cmdchar == 'x' && vim_strchr (p_ww , 'l' ) != NULL
7406- && gchar_cursor () == NUL )
7407- stuffReadbuff ((char_u * )"dd" );
7408- else
7409- stuffReadbuff (ar [(int )(vim_strchr (str , cap -> cmdchar ) - str )]);
7403+ stuffReadbuff (ar [(int )(vim_strchr (str , cap -> cmdchar ) - str )]);
74107404 }
74117405 }
74127406 cap -> opcount = 0 ;
0 commit comments