]> git.wh0rd.org Git - nano.git/commitdiff
cuting newline-related totsize fixes
authorRobert Siemborski <rjs3@andrew.cmu.edu>
Tue, 4 Jul 2000 21:29:24 +0000 (21:29 +0000)
committerRobert Siemborski <rjs3@andrew.cmu.edu>
Tue, 4 Jul 2000 21:29:24 +0000 (21:29 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@66 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

cut.c

diff --git a/cut.c b/cut.c
index 36517984a5d374c3408e2243a28eef9d7c24e19e..a746a74401e6fe011905d32c05e589a82b74d29f 100644 (file)
--- a/cut.c
+++ b/cut.c
@@ -197,6 +197,7 @@ int do_cut_text(void)
            tmp = fileptr;
            fileage = fileptr;
            add_to_cutbuffer(fileptr->prev);
+           totsize--; /* get the newline */
            totlines--;
            fileptr->prev = NULL;
            edit_update(fileage);
@@ -216,6 +217,7 @@ int do_cut_text(void)
            (fileptr->next)->prev = fileptr->prev;
            current = fileptr->next;
            totlines--;
+           totsize--; /* get the newline */
        } else {
            /* we're deleteing the last line
               and replacing it with a dummy line,