From: David Lawrence Ramsey Date: Tue, 7 Aug 2007 23:51:05 +0000 (+0000) Subject: simplify X-Git-Tag: v2.1.0~83 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f03171917fb42498aca79ef89410a41bc1ee37a4;p=nano.git simplify git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/nano.c b/src/nano.c index 65b57658..fa9146f3 100644 --- a/src/nano.c +++ b/src/nano.c @@ -395,19 +395,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 @@ -433,7 +428,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