here an image to explain for my question:
the first one is initial state, as you look, the size is not correct...
but it will be auto resized after you typing some text - second one.
and even you remove all text, the caret is still correct.
so my question is, how to set the initial size of the caret for the texteditor?