Commit 212ab782 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

simplify cut_line() further

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3119 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 19037132
Showing with 2 additions and 6 deletions
+2 -6
......@@ -45,16 +45,12 @@ void cutbuffer_reset(void)
* place we want to the beginning of the current line. */
void cut_line(void)
{
size_t data_len = strlen(openfile->current->data);
assert(openfile->current_x <= data_len);
if (openfile->current != openfile->filebot)
move_to_filestruct(&cutbuffer, &cutbottom, openfile->current, 0,
openfile->current->next, 0);
else if (data_len > 0)
else
move_to_filestruct(&cutbuffer, &cutbottom, openfile->current, 0,
openfile->current, data_len);
openfile->current, strlen(openfile->current->data));
openfile->placewewant = 0;
}
......
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