On 11/20/2011 05:31 PM, Jean-Marc Lasgouttes wrote: > Le Sat Nov 19 17:15:23 2011, Richard Heck a écrit : >> Where is this supposed to happen automatically? I see that markDirty() >> is called from recordUndo(), but that gets called from tons of places. > > Oops, my former comment was based on outdated view of the code. > Nowadays, recordUndo does the trick. So you just proved that the bug > is that branch (de)activate is not undo-enabled. The dirty tag is just > a collateral damage. > >> Presumably one option would be to call it from within BRANCH_ACTIVATE, >> but one issue here is that the branch activation info is held in the >> master buffer, so it's actually that buffer we need to mark dirty, or >> where we would need to do recordUndo(). > > You have to call recordUndoFullDocument (should be > recordUndoBufferParams, but alas this does not exist) on the master > buffer, then. But I do not see where is the magic code that gives the > master buffer. > I'll have a look at this. Before I do, is there any interaction between this kind of thing and the whole ReadOnly issue? I.e., we have undo with read-only documents?
Richard