"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/fe-text/textbuffer-view.c" between
irssi-1.2.2.tar.gz and irssi-1.2.3.tar.gz

About: irssi is a terminal based IRC client that also supports SILC and ICB protocols via plugins.

textbuffer-view.c  (irssi-1.2.2):textbuffer-view.c  (irssi-1.2.3)
skipping to change at line 1207 skipping to change at line 1207
{ {
int realcount; int realcount;
view_bookmarks_check(view, line); view_bookmarks_check(view, line);
if (view->buffer->cur_line == line) { if (view->buffer->cur_line == line) {
/* the last line is being removed */ /* the last line is being removed */
LINE_REC *prevline; LINE_REC *prevline;
prevline = view->buffer->first_line == line ? NULL : prevline = view->buffer->first_line == line ? NULL :
textbuffer_line_last(view->buffer); textbuffer_line_last(view->buffer)->prev;
view->cache->last_linecount = prevline == NULL ? 0 : view->cache->last_linecount = prevline == NULL ? 0 :
view_get_linecount(view, prevline); view_get_linecount(view, prevline);
} }
/* first line in the buffer - this is the most commonly
removed line.. */
if (view->buffer->first_line == line) { if (view->buffer->first_line == line) {
/* first line in the buffer - this is the most commonly
removed line.. */
if (view->bottom_startline == line) { if (view->bottom_startline == 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 == line) { if (view->startline == line) {
/* removing the first line in screen */ /* removing the first line in screen */
int is_last = view->startline->next == NULL; int is_last = view->startline->next == NULL;
skipping to change at line 1291 skipping to change at line 1291
view_remove_cache(view, line, update_counter); view_remove_cache(view, line, update_counter);
for (tmp = view->siblings; tmp != NULL; tmp = tmp->next) { for (tmp = view->siblings; tmp != NULL; tmp = tmp->next) {
TEXT_BUFFER_VIEW_REC *rec = tmp->data; TEXT_BUFFER_VIEW_REC *rec = tmp->data;
view_remove_line(rec, line, linecount); view_remove_line(rec, line, linecount);
view_remove_cache(rec, line, update_counter); view_remove_cache(rec, line, update_counter);
} }
textbuffer_remove(view->buffer, line); textbuffer_remove(view->buffer, line);
if (view->bottom_startline == NULL) {
/* We may have removed the bottom_startline, make sure
that scroll doesn't get stuck */
textbuffer_view_init_bottom(view);
}
} }
void textbuffer_view_remove_lines_by_level(TEXT_BUFFER_VIEW_REC *view, int level ) void textbuffer_view_remove_lines_by_level(TEXT_BUFFER_VIEW_REC *view, int level )
{ {
LINE_REC *line, *next; LINE_REC *line, *next;
term_refresh_freeze(); term_refresh_freeze();
line = textbuffer_view_get_lines(view); line = textbuffer_view_get_lines(view);
while (line != NULL) { while (line != NULL) {
 End of changes. 4 change blocks. 
3 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)