in do_cut_text(), if keep_cutbuffer is FALSE, only blow away the text in

the cutbuffer if the cutbuffer isn't empty


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2126 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-11-23 17:59:32 +00:00
parent bc3b92605e
commit 4d6ec37676
2 changed files with 6 additions and 3 deletions

View File

@ -13,6 +13,9 @@ CVS code -
buffer rather than the cutbuffer. Changes to backup_lines(), buffer rather than the cutbuffer. Changes to backup_lines(),
do_justify(), etc. (DLR) do_justify(), etc. (DLR)
- cut.c: - cut.c:
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() do_uncut_text()
- No longer duplicate Pico's adding an extra magicline to the - No longer duplicate Pico's adding an extra magicline to the
file if uncutting leaves the cursor on the current one, as file if uncutting leaves the cursor on the current one, as

View File

@ -101,9 +101,9 @@ void do_cut_text(void)
check_statusblank(); check_statusblank();
/* If keep_cutbuffer is FALSE, blow away the text in the /* If keep_cutbuffer is FALSE and the cutbuffer isn't empty, blow
* cutbuffer. */ * away the text in the cutbuffer. */
if (!keep_cutbuffer) { if (!keep_cutbuffer && cutbuffer != NULL) {
free_filestruct(cutbuffer); free_filestruct(cutbuffer);
cutbuffer = NULL; cutbuffer = NULL;
#ifdef DEBUG #ifdef DEBUG