Rework of edit mode locking