From: David Lawrence Ramsey Date: Tue, 7 Aug 2007 23:51:05 +0000 (+0000) Subject: simplify X-Git-Tag: v2.0.7~62 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=db67b1bc8225b519d4e03f718f2688d100855a61;p=nano.git simplify git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_0_branch/nano@4142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/nano.c b/src/nano.c index 58bafe5f..cf8e7585 100644 --- a/src/nano.c +++ b/src/nano.c @@ -394,19 +394,14 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot) filestruct *top_save; bool edittop_inside; #ifndef NANO_TINY - bool right_side_up = FALSE; + bool do_mark_shift = FALSE; #endif assert(file_top != NULL && file_bot != NULL); #ifndef NANO_TINY - if (openfile->mark_set) { - filestruct *top, *bot; - size_t top_x, bot_x; - - mark_order((const filestruct **)&top, &top_x, - (const filestruct **)&bot, &bot_x, &right_side_up); - } + if (openfile->mark_set) + do_mark_shift = (openfile->current_x <= openfile->mark_begin_x); #endif /* Partition the filestruct so that it contains no text, and keep @@ -432,7 +427,7 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot) #ifndef NANO_TINY if (openfile->mark_set) { openfile->mark_begin = openfile->current; - if (!right_side_up) + if (do_mark_shift) openfile->mark_begin_x += openfile->current_x; } #endif