diff options
Diffstat (limited to 'src/analysis/db/items')
-rw-r--r-- | src/analysis/db/items/bookmark.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/analysis/db/items/bookmark.c b/src/analysis/db/items/bookmark.c index f493559..2afbbc0 100644 --- a/src/analysis/db/items/bookmark.c +++ b/src/analysis/db/items/bookmark.c @@ -526,7 +526,6 @@ static bool g_db_bookmark_run(GDbBookmark *bookmark, GLoadedBinary *binary, bool GBufferCache *cache; /* Tampon d'impression colorée */ GLineCursor *cursor; /* Emplacement dans un tampon */ size_t index; /* Indice de ligne à traiter */ - GBufferLine *line; /* Ligne de tampon à marquer */ result = false; @@ -544,22 +543,18 @@ static bool g_db_bookmark_run(GDbBookmark *bookmark, GLoadedBinary *binary, bool g_object_unref(G_OBJECT(cursor)); - line = g_buffer_cache_find_line_by_index(cache, index); + index = g_buffer_cache_look_for_flag(cache, index, BLF_HAS_CODE); /* Application du changement */ - result = (line != NULL); + result = (index < g_buffer_cache_count_lines(cache)); if (result) { if (set) - g_buffer_line_add_flag(line, BLF_BOOKMARK); + g_buffer_cache_add_line_flag(cache, index, BLF_BOOKMARK); else - g_buffer_line_remove_flag(line, BLF_BOOKMARK); - - g_object_unref(G_OBJECT(line)); - - g_buffer_cache_throw_update_at_index(cache, index); + g_buffer_cache_remove_line_flag(cache, index, BLF_BOOKMARK); } |