From c218415212a7424c12fe27d3ea670b4c45e364dc Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 26 Jan 2014 22:47:08 +0000 Subject: [PATCH] 2014-01-24 Benno Schulenberg * src/nano.c (copy_from_filestruct) - Check explicitly for mark being set when trying to partition, as we shouldn't be messing with the x address, etc. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4585 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/nano.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 84b8295a..c073dffc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-01-24 Benno Schulenberg + * src/nano.c (copy_from_filestruct) - Check explicitly for mark being set when + trying to partition, as we shouldn't be messing with the x address, etc. + 2014-01-25 Chris Allegretta * src/winio.c (set_modified) - Check for a filename before we bother trying to lock diff --git a/src/nano.c b/src/nano.c index ccd62786..08c8441f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -465,7 +465,12 @@ void copy_from_filestruct(filestruct *file_top, filestruct *file_bot) } #ifndef NANO_TINY else if (openfile->mark_set) { - if (!right_side_up) { + if (right_side_up) { + if (single_line) + /* get the new data, stuff was inserted on mark line */ + openfile->mark_begin = openfile->fileage; + /* the x is okay, it did not move */ + } else { if (single_line) { openfile->mark_begin = openfile->current; openfile->mark_begin_x -= current_x_save; -- 2.39.5