1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Remove useless code, cur_line is always the last line of the textbuffer.

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4976 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2009-01-04 15:56:54 +00:00 committed by exg
parent 8cc7a02b4d
commit 5b76b1585f

View File

@ -217,14 +217,7 @@ static LINE_REC *textbuffer_line_insert(TEXT_BUFFER_REC *buffer,
LINE_REC *textbuffer_line_last(TEXT_BUFFER_REC *buffer)
{
LINE_REC *line;
line = buffer->cur_line;
if (line != NULL) {
while (line->next != NULL)
line = line->next;
}
return line;
return buffer->cur_line;
}
int textbuffer_line_exists_after(LINE_REC *line, LINE_REC *search)
@ -338,8 +331,7 @@ void textbuffer_remove(TEXT_BUFFER_REC *buffer, LINE_REC *line)
line->next->prev = line->prev;
if (buffer->cur_line == line) {
buffer->cur_line = line->next != NULL ?
line->next : line->prev;
buffer->cur_line = line->prev;
}
line->prev = line->next = NULL;