On Jan 7, 8:41 am, "Edward K. Ream" <[email protected]> wrote:
> This example really stresses the update algorithm. It's a fascinating > test case. There seems to be a flaw in the update algorithm in the propagate_changed_lines method. It doesn't make sense that the algorithm should handle the difflib 'insert' opcode the same as it handles the 'replace' opcode. This may be the root cause of the problem. Indeed, one would expect that when replacing one set of lines by another that the sentinels would be copied as part of the replacement, at least if the number of replaced lines are the same. Maybe this special case (replace the same number of lines) wouldn't usually make a difference. And maybe it would even be dangerous. That remains to be seen. OTOH, perhaps the new code can be handled to handle more general replacements smoothly. In any case, the present code does not yield good results in the example at hand. I'll see if tweaks will work. Clearly, any change to this algorithm demands additional unit tests. Edward
-- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
