diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-08-18 20:08:39 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-08-18 20:08:39 (GMT) |
commit | c5631dd09fa9981e914ec9082c6270b69a719ca4 (patch) | |
tree | 0d50b3a82f466d2b8587ad20cfb0c93b180897ee /src/analysis/db/items | |
parent | e5185bf4b4b6f76f15d3ff460a9cea40a8753284 (diff) |
Refreshed the rendering for newly added bookmarks.
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); } |