From b387137af758481d5a9ec1a3f459b49cccc76028 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 9 Nov 2005 00:23:12 +0000 Subject: [PATCH] in cut_line(), since placewewant will always be zero after the line is cut, set it to zero directly instead of assigning it the value of xplustabs() git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3116 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 +++++ src/cut.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c81aeb2..620f65e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -82,6 +82,11 @@ CVS code - character as having the width of Unicode U+FFFD (Replacement Character) instead of having a width of zero, since display problems can crop up with the latter approach. (DLR) +- cut.c: + cut_line() + - Since placewewant will always be zero after the line is cut, + set it to zero directly instead of assigning it the value of + xplustabs(). (DLR) - files.c: read_file() - Remove apparently unneeded logic to handle a case where diff --git a/src/cut.c b/src/cut.c index dd384762..82c71e44 100644 --- a/src/cut.c +++ b/src/cut.c @@ -40,10 +40,10 @@ void cutbuffer_reset(void) /* If we're not on the last line of the file, move all the text of the * current line, plus the newline at the end, to the cutbuffer, and set - * the current place we want to where the line used to start. If we - * are, and the last line of the file isn't blank, move all of the text - * of the current line to the cutbuffer, and set the current place we - * want to where the now-blank line starts. */ + * the current place we want to the beginning of the now-nonexistent + * line. If we are, and the last line of the file isn't blank, move all + * of the text of the current line to the cutbuffer, and set the current + * place we want to the beginning of the now-blank line. */ void cut_line(void) { size_t data_len = strlen(openfile->current->data); @@ -57,7 +57,7 @@ void cut_line(void) move_to_filestruct(&cutbuffer, &cutbottom, openfile->current, 0, openfile->current, data_len); - openfile->placewewant = xplustabs(); + openfile->placewewant = 0; } #ifndef NANO_SMALL