mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Set view->startline to NULL when the line to delete is the first of the view
buffer and there are no more lines in the view. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4350 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
9bd7272d47
commit
9c835d33b5
@ -1143,11 +1143,15 @@ static void view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
|
||||
|
||||
if (view->startline == line) {
|
||||
/* removing the first line in screen */
|
||||
int is_last = view->startline->next == NULL;
|
||||
|
||||
realcount = view_scroll(view, &view->startline,
|
||||
&view->subline,
|
||||
linecount, FALSE);
|
||||
view->ypos -= realcount;
|
||||
view->empty_linecount += linecount-realcount;
|
||||
if (is_last == 1)
|
||||
view->startline = NULL;
|
||||
}
|
||||
} else {
|
||||
if (textbuffer_line_exists_after(view->bottom_startline,
|
||||
|
Loading…
Reference in New Issue
Block a user