From: David Lawrence Ramsey Date: Wed, 24 Nov 2004 20:12:57 +0000 (+0000) Subject: oops again; adding an extra magicline unconditionally when uncutting is X-Git-Tag: v1.3.6~269 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=eeec999548cc3e1ec85423bcd07e1d32e5f208c0;p=nano.git oops again; adding an extra magicline unconditionally when uncutting is inconsistent with how file insertion behaves, so it apparently is a bug; revert the previous behavior git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2131 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 70c3b7a7..6bed326e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,11 @@ CVS code - do_cut_text() - If keep_cutbuffer is FALSE, only blow away the text in the cutbuffer if the cutbuffer isn't empty. (DLR) + do_uncut_text() + - No longer duplicate Pico's adding an extra magicline to the + file if uncutting leaves the cursor on the current one. This + behavior appears to be a bug, as inserting a file in the same + manner doesn't add an extra magicline. (DLR) - global.c: shortcut_init() - Fix misplaced #endif keeping the "Full Justify" shortcut in diff --git a/src/cut.c b/src/cut.c index 68159250..1d4cac6c 100644 --- a/src/cut.c +++ b/src/cut.c @@ -156,17 +156,9 @@ void do_uncut_text(void) return; /* Add a copy of the text in the cutbuffer to the current filestruct - * at the current cursor position. Note that if the text in the - * cutbuffer doesn't end in a newline and the current cursor - * position is on the magicline, a new magicline will be added. */ + * at the current cursor position. */ copy_from_filestruct(cutbuffer, cutbottom); - /* If the text in the cutbuffer does end in a newline and the - * current cursor position is on the magicline, add a new magicline - * for consistency. */ - if (current == filebot) - new_magicline(); - /* Set the current place we want to where the text from the * cutbuffer ends. */ placewewant = xplustabs();