On Fri, Dec 8, 2017 at 8:47 AM, Terry Brown <terrynbr...@gmail.com> wrote:
> On Fri, 8 Dec 2017 04:37:01 -0800 (PST) > "Edward K. Ream" <edream...@gmail.com> wrote: > > > 3. The nodetags.py plugins caches vnodes. This is fine as long the > > plugin (in effect) recreates the cache when the outline changes. > > Short version: in what way must the plugin "recreate" vnode data when > the outline changes, assuming it's using c.vnode2position() when > appropriate? > c.vnode2position should work. I think this answers your longer question. However, it may be faster to do something like this (not tested) # old_vnodes is the cached vnodes new_vnodes = set() for p in c.all_unique_positions(): if p.v in old_vnodes: new_vnodes.add(p.v) new_vnodes = list(new_vnodes) Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.