% % stack: target-name % true !added ._Drag < |Before % % add the cloned node before the current node % _\ positive { % remove any selected node memory % _\ "CopyOne" do % % the insert is before the target node % _\ "Insert" do *nodedset } { pop false !added } ifelse |After % % add the cloned node after the current node % _\ "CopyOne" do % % move to the next sibling of the current node % _\ Mep._Next neg( { % % there is no next sibling, insert as child of parent % pop Tree._Parent neg( { % % there is no parent, do not add the cloned node % pop2 false !added } { "LoadItem" do "New" get !\ *nodedset } ifelse } { % % there is a next sibling, insert before it % dup !\ "Insert" do *nodedset } ifelse |Child % % add the cloned node under the current node % _\ "CopyOne" do _\ "LoadItem" do "New" get !\ *nodedset > not { % % this is a rename of the current node % dup _\\ exact$ { % % there has been no rename % pop } { % % there has been a rename % !\\ Tree.Changed } ifelse } if