git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2007-08-07 23:51:05 +00:00
parent d1ab89a929
commit f03171917f
1 changed files with 4 additions and 9 deletions

View File

@ -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