• Colomban Wendling's avatar
    Update the symbol list rather than clearing and re-building it · 57d00f48
    Colomban Wendling yazdı
    The main advantages of not clearing and rebuilding the whole list is
    that it doesn't loose the folding and selection (as far as the selected
    row(s) still exist after the update, of course), and it reduces
    flickering upon update.
    
    The current implementation works in 3-steps:
    1) mark all rows as invalid;
    2) insert/update the rows, according to the new tag list, marking them
       as valid;
    3) remove all rows that are still invalid.
    This walks (rows) the first time, (tags*rows) the second and (rows) the
    third. This also uses an extra column to store the row's validity.
    
    A (probably) better implementation would be to:
    1) walk the current rows, updating them if necessary, or removing them;
    2) add the remaining tags that weren't there before.
    This is probably faster in theory (and probably also in practice), but
    it needs to refactor a lot the code to easily update *or* create a row,
    what the current code does not provide.
    Basically this is would be a two-pass update, walking (rows*tags) in
    the first pass, and only the remaining non-added tags in the second.
    
    
    git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5562 ea778897-0a13-0410-b9d1-a72fbfd435f5
    57d00f48
sidebar.h 1.86 KB