1
0
mirror of https://github.com/irssi/irssi.git synced 2025-01-03 14:56:47 -05:00

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
This commit is contained in:
Emanuele Giaquinta 2007-03-12 22:54:45 +00:00 committed by exg
parent 295e5980d3
commit 87ee8e85ca

View File

@ -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);
}