Cursor bounds checking.