From bfb98f8bd495ca7611d504f737e11285ae17a061 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 12 Nov 2004 21:46:14 +0000 Subject: [PATCH] in do_cut_text(), set concatenate_cut to TRUE unconditionally when doing a marked cut; this fixes an incompatibility with Pico where an extra line is uncut if we do a marked cut that includes the magicline and immediately follow it with an unmarked cut git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 6 ++++++ src/cut.c | 8 ++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf43c6b2..c20d1fd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -114,6 +114,12 @@ CVS code - handle this. (DLR) - Convert some ints with predefined boundaries to enums. (DLR) - cut.c: + do_cut_text() + - Set concatenate_cut to TRUE unconditionally when doing a + marked cut. This fixes an incompatibility with Pico where an + extra line is uncut if we do a marked cut that includes the + magicline and immediately follow it with an unmarked cut. + (DLR) do_uncut_text() - Maintain current_y's value when uncutting blocks so that smooth scrolling works correctly. (DLR) diff --git a/src/cut.c b/src/cut.c index 70acc431..aa0d0096 100644 --- a/src/cut.c +++ b/src/cut.c @@ -264,13 +264,9 @@ void do_cut_text(void) placewewant = xplustabs(); UNSET(MARK_ISSET); - /* If we just did a marked cut of part of a line, we should add - * the first line of any cut done immediately afterward to the - * end of this cut, as Pico does. */ - if (current == mark_beginbuf && current_x < - strlen(current->data)) - concatenate_cut = TRUE; marked_cut = CUT_MARKED; + concatenate_cut = TRUE; + edit_refresh(); set_modified(); return; -- 2.39.5