+ // FIXME If the branch is in the master document, we cannot
+ // call recordUndo..., becuase the master may be hidden, and
+ // the code presently assumes that hidden documents can never
+ // be dirty. See GuiView::closeBufferAll(), for example.
+ if (!branch_in_master)
+ buffer().undo().recordUndoFullDocument(cur);