Correctly handle cursor behavior in composition string.