magnars helpers to duplicate line or region.