On Tuesday, July 15, 2025 at 8:01:45 AM UTC-5 tbp1...@gmail.com wrote:
I've had a few errors already but they have only been partly repeatable. I added a new line to the top of the file in the external editor: *@nocolor*. Leo directives are a special case that I have not fully considered before. Here's what I know: First, Leo never writes Leo directives (or sentinels) when writing @clean trees. That's fine, because we assume that the external files should (and do) know nothing about Leo! Second, the @clean update algorithm will read *any* line (including Leo directives) because the algorithm knows *nothing* about Leo or importers. It's driven purely by diffs. But that shouldn't matter either. In other words, there is nothing very special about @color or @nocolor. If you add them to an external file, Leo will keep on deleting them (as it should) when rewriting the file. The crashes are another matter. I suspect a missing call to c.recolor may be the culprit. My first thought is to call c.redraw_later() at the end of at.clone_all_changed_vnodes. Traces confirm that the desired tree redraw eventually happens. I don't want to call c.redraw because that would force an immediate redraw. In turn, that might cause unwanted flash. 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 view this discussion visit https://groups.google.com/d/msgid/leo-editor/d90025c8-dd1f-4f65-8624-8757fe686ca5n%40googlegroups.com.