Simplify cmpPos as suggested by cben: https://github.com/firebase/firepad/commit/9c12f00d0f2f96a33a65b9a21ac1f5fbd8c16844#commitcomment-5027092