From e3805b63a5d1d41e5354e238447e66c068fbe081 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 11 May 2001 14:12:21 +0000 Subject: [PATCH] Line removing fixes, /LAST -clear fixed git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1477 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/lastlog.c | 2 +- src/fe-text/textbuffer-view.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fe-text/lastlog.c b/src/fe-text/lastlog.c index 4178764c..75e68da3 100644 --- a/src/fe-text/lastlog.c +++ b/src/fe-text/lastlog.c @@ -47,8 +47,8 @@ static void window_lastlog_clear(WINDOW_REC *window) if (line->info.level & MSGLEVEL_LASTLOG) textbuffer_view_remove_line(view, line); } + textbuffer_view_redraw(view); screen_refresh_thaw(); - //gui_window_redraw(window); } /* Only unknown keys in `optlist' should be levels. diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index 99b0c210..88ad79ba 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -848,8 +848,10 @@ static void view_bookmarks_check(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) if (rec.remove_list != NULL) { GList *pos = g_list_find(view->buffer->lines, line); + newline = pos == NULL || pos->prev == NULL ? NULL : - pos->next->data; + (pos->next == NULL ? pos->prev->data : + pos->next->data); for (tmp = rec.remove_list; tmp != NULL; tmp = tmp->next) { g_hash_table_remove(view->bookmarks, tmp->data); if (newline != NULL) { @@ -924,7 +926,7 @@ static void view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line, from bottom_startline */ view_scroll(view, &view->startline, &view->subline, -linecount, TRUE); - view->ypos -= realcount; + view->ypos -= linecount-realcount; } else { if (view->startline->data == line) { view->startline =