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
This commit is contained in:
David Lawrence Ramsey 2005-11-09 00:23:12 +00:00
parent 0f6236f556
commit b387137af7
2 changed files with 10 additions and 5 deletions

View File

@ -82,6 +82,11 @@ CVS code -
character as having the width of Unicode U+FFFD (Replacement character as having the width of Unicode U+FFFD (Replacement
Character) instead of having a width of zero, since display Character) instead of having a width of zero, since display
problems can crop up with the latter approach. (DLR) 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: - files.c:
read_file() read_file()
- Remove apparently unneeded logic to handle a case where - Remove apparently unneeded logic to handle a case where

View File

@ -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 /* 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 * 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 * the current place we want to the beginning of the now-nonexistent
* are, and the last line of the file isn't blank, move all of the text * line. If we are, and the last line of the file isn't blank, move all
* of the current line to the cutbuffer, and set the current place we * of the text of the current line to the cutbuffer, and set the current
* want to where the now-blank line starts. */ * place we want to the beginning of the now-blank line. */
void cut_line(void) void cut_line(void)
{ {
size_t data_len = strlen(openfile->current->data); size_t data_len = strlen(openfile->current->data);
@ -57,7 +57,7 @@ void cut_line(void)
move_to_filestruct(&cutbuffer, &cutbottom, openfile->current, 0, move_to_filestruct(&cutbuffer, &cutbottom, openfile->current, 0,
openfile->current, data_len); openfile->current, data_len);
openfile->placewewant = xplustabs(); openfile->placewewant = 0;
} }
#ifndef NANO_SMALL #ifndef NANO_SMALL