From 87ee8e85ca2299f97bbede1c4a39f00e7efb47d2 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Mon, 12 Mar 2007 22:54:45 +0000 Subject: [PATCH] When removing a line from the view also unconditionally remove any bookmark for that line rather than moving it to the next/previous line, if any. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4433 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/textbuffer-view.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index bffc0e25..8ffbfcd8 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -1045,7 +1045,6 @@ static void bookmark_check_remove(char *key, LINE_REC *line, static void view_bookmarks_check(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) { BOOKMARK_FIND_REC rec; - LINE_REC *new_line; GSList *tmp; rec.remove_line = line; @@ -1054,16 +1053,9 @@ static void view_bookmarks_check(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) (GHFunc) bookmark_check_remove, &rec); if (rec.remove_list != NULL) { - new_line = line->prev == NULL ? NULL : - (line->next == NULL ? line->prev : line->next); for (tmp = rec.remove_list; tmp != NULL; tmp = tmp->next) { g_hash_table_remove(view->bookmarks, tmp->data); - if (new_line != NULL) { - g_hash_table_insert(view->bookmarks, - tmp->data, new_line); - } else { - g_free(tmp->data); - } + g_free(tmp->data); } g_slist_free(rec.remove_list); }