Function EditWidgetBase.correctCaretPos
when cursor position or selection is out of content bounds, fix it to nearest valid position
void correctCaretPos();
when cursor position or selection is out of content bounds, fix it to nearest valid position
void correctCaretPos();