diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-03-12 22:54:45 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-03-12 22:54:45 +0000 |
commit | 87ee8e85ca2299f97bbede1c4a39f00e7efb47d2 (patch) | |
tree | d311e7821bdbafd1b027d75401c190d94e5dd82c /src/fe-text | |
parent | 295e5980d358a2e04b42314a05e9d88863ba73e5 (diff) | |
download | irssi-87ee8e85ca2299f97bbede1c4a39f00e7efb47d2.zip |
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
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/textbuffer-view.c | 10 |
1 files changed, 1 insertions, 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); } |