Index: src/nano.h =================================================================== --- src/nano.h (revision 4962) +++ src/nano.h (working copy) @@ -575,7 +575,7 @@ /* Extra bits for the undo function. */ #define UNdel_del (1<<0) #define UNdel_backspace (1<<1) -#define UNsplit_completed (1<<2) +#define UNcut_marked_rightToleft (1<<2) #define UNcut_cutline (1<<3) #endif /* !NANO_TINY */ Index: src/text.c =================================================================== --- src/text.c (revision 4962) +++ src/text.c (working copy) @@ -398,6 +398,8 @@ if (u->xflags == UNcut_cutline) goto_line_posx(u->mark_begin_lineno, u->mark_begin_x); + else if (u->xflags == UNcut_marked_rightToleft) + goto_line_posx(u->mark_begin_lineno, u->mark_begin_x); } /* Redo a cut, or undo an uncut. */ @@ -1078,6 +1080,7 @@ ssize_t line = u->lineno; u->lineno = u->mark_begin_lineno; u->mark_begin_lineno = line; + u->xflags = UNcut_marked_rightToleft; } } else if (!ISSET(CUT_TO_END)) { /* Compute cutbottom for the uncut using our copy. */