1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

removing line from the top of the screen crashed irssi

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1507 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-05-21 22:45:49 +00:00 committed by cras
parent c7d4b81069
commit d9bf6afc0a

View File

@ -905,17 +905,19 @@ static void view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
if (line == view->buffer->lines->data) { if (line == view->buffer->lines->data) {
/* first line in the buffer - this is the most commonly /* first line in the buffer - this is the most commonly
removed line.. */ removed line.. */
if (line == view->bottom_startline->data) { if (view->bottom_startline->data == line) {
/* very small scrollback.. */ /* very small scrollback.. */
view->bottom_startline = view->bottom_startline->next; view->bottom_startline = view->bottom_startline->next;
view->bottom_subline = 0; view->bottom_subline = 0;
}
if (view->startline->data == line) { if (view->startline->data == line) {
view->startline = view->startline->next; /* removing the first line in screen */
view->subline = 0; realcount = view_scroll(view, &view->startline,
view->empty_linecount += linecount; &view->subline,
view->ypos -= linecount; linecount, TRUE);
} view->ypos -= realcount;
view->empty_linecount += linecount-realcount;
} }
} else if (g_list_find(view->bottom_startline, line) != NULL) { } else if (g_list_find(view->bottom_startline, line) != NULL) {
realcount = view_scroll(view, &view->bottom_startline, realcount = view_scroll(view, &view->bottom_startline,