diff --git a/ChangeLog b/ChangeLog index fb835743919f9066f25705cc68f50a3660864cef..fb567420b97780b30964e49fdc387cc875fc3412 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ CVS code - cut.c: do_cut_text() - Fixed getting locked into cutbuffer on cutting first line of file. + - Added check_statblank(). + - Check for fileptr == filebot, if so return, we shouldn't bother + cutting the magic line. + do_uncut_text() + - Added check_statblank(). - nano.c: main() - Changed tabsize long arg to actually accept an argument *sigh*. diff --git a/cut.c b/cut.c index 48b017271cb26f282e7d8490dcd733f7883feec1..ddc9e934f54b7b606f3d0faa19c110a189a22946 100644 --- a/cut.c +++ b/cut.c @@ -136,7 +136,8 @@ int do_cut_text(void) int newsize, cuttingtoend = 0; #endif - if (fileptr == NULL || fileptr->data == NULL) + check_statblank(); + if (fileptr == NULL || fileptr->data == NULL || fileptr == filebot) return 0; tmp = fileptr->next; @@ -242,18 +243,8 @@ int do_cut_text(void) current = fileptr->next; totlines--; totsize--; /* get the newline */ - } else { - /* we're deleteing the last line - and replacing it with a dummy line, - so totlines is the same */ - tmp = fileptr->prev; - tmp->next = make_new_node(tmp); - tmp = tmp->next; - tmp->data = nmalloc(1); - strcpy(tmp->data, ""); - current = tmp; - filebot = tmp; - } + } /* No longer an else here, because we never get here anymore... + No need to cut the magic line, as it's empty */ add_to_cutbuffer(fileptr); } @@ -285,6 +276,7 @@ int do_uncut_text(void) int i; wrap_reset(); + check_statblank(); if (cutbuffer == NULL || fileptr == NULL) return 0; /* AIEEEEEEEEEEEE */ diff --git a/po/nano.pot b/po/nano.pot index f8b7e6d49479710fdcefc657b95033e8e0eec0bd..513b61e6c6c55be1c64f3326676439f5e4a69714 100644 --- a/po/nano.pot +++ b/po/nano.pot @@ -1,12 +1,12 @@ -# Nano strings file. +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. -# Chris Allegretta <chrisa@asty.org>, 2000. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-08-06 17:19-0400\n" +"POT-Creation-Date: 2000-08-07 10:44-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 ""