Commit 4d6ec376 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 6 additions and 3 deletions
+6 -3
...@@ -13,6 +13,9 @@ CVS code - ...@@ -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
......
...@@ -101,9 +101,9 @@ void do_cut_text(void) ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment