cursor position and style update