summaryrefslogtreecommitdiff
path: root/src/fe-text/textbuffer-view.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-05-11 14:12:21 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-05-11 14:12:21 +0000
commite3805b63a5d1d41e5354e238447e66c068fbe081 (patch)
tree5ce006ba36df8307698d72f960b409519c21dd6d /src/fe-text/textbuffer-view.c
parent4e06d502553cc8414f9164e2bb9a4d2b4bfc6448 (diff)
downloadirssi-e3805b63a5d1d41e5354e238447e66c068fbe081.zip
Line removing fixes, /LAST -clear fixed
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1477 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r--src/fe-text/textbuffer-view.c6
1 files changed, 4 insertions, 2 deletions
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 =