From 63aa0f7f165db8313e7cb739d6eeb903768186c4 Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Thu, 27 Jul 2000 04:09:23 +0000
Subject: [PATCH] More -k fixes, almost works perfectly ;-)

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@130 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 cut.c       | 7 +++++--
 po/nano.pot | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/cut.c b/cut.c
index c0b5c5dd..87c1b44b 100644
--- a/cut.c
+++ b/cut.c
@@ -56,6 +56,7 @@ void add_to_cutbuffer(filestruct * inptr)
 
     inptr->next = NULL;
     cutbottom = inptr;
+    dump_buffer(cutbuffer);
 }
 
 #ifndef NANO_SMALL
@@ -134,7 +135,6 @@ int do_cut_text(void)
 #ifndef NANO_SMALL
     char *tmpstr;
     int newsize, cuttingtoend = 0;
-
 #endif
 
     if (fileptr == NULL || fileptr->data == NULL)
@@ -142,9 +142,10 @@ int do_cut_text(void)
 
     tmp = fileptr->next;
 
-    if (!ISSET(KEEP_CUTBUFFER) || ISSET(MARK_ISSET)) {
+    if (!ISSET(KEEP_CUTBUFFER)) {
 	free_filestruct(cutbuffer);
 	cutbuffer = NULL;
+
 #ifdef DEBUG
 	fprintf(stderr, _("Blew away cutbuffer =)\n"));
 #endif
@@ -157,6 +158,7 @@ int do_cut_text(void)
 	    /* FIXME - We really need to put this data into the
 	       cutbuffer, not delete it and forget about it. */
 	    do_delete();
+	    SET(KEEP_CUTBUFFER);
 	    return 1;
 	}
 	else
@@ -203,6 +205,7 @@ int do_cut_text(void)
 
 	placewewant = xplustabs();
 	UNSET(MARK_ISSET);
+
 	marked_cut = 1;
 	set_modified();
 	if (cuttingtoend)
diff --git a/po/nano.pot b/po/nano.pot
index 7ff81c24..82a3128d 100644
--- a/po/nano.pot
+++ b/po/nano.pot
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-07-24 23:24-0400\n"
+"POT-Creation-Date: 2000-07-26 23:51-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,7 +19,7 @@ msgstr ""
 msgid "add_to_cutbuffer called with inptr->data = %s\n"
 msgstr ""
 
-#: cut.c:149
+#: cut.c:150
 msgid "Blew away cutbuffer =)\n"
 msgstr ""
 
-- 
GitLab