Commit b387137a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 10 additions and 5 deletions
+10 -5
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment