Fix a bidi cursor drawing bug