Determines if, in case text wraps over the new line, and the caret is in an ambiguous position, the caret
will move to the next line, or stay on the previous one. Usually false, except for arrow keys and the
"home" key.
In cases where the text wraps over to the new line due to lack of space, the implied line break creates an
ambiguous position for the caret. The caret may be placed either at the end of the original line, or be put
on the newly created line:
Depending on the situation, either position may be preferable. Keep in mind that the caret position influences
further movement, particularly when navigating using the down and up arrows. In case the caret is at the
end of the line, it should stay close to the end, but when it's at the beginning, it should stay close to the
start.
This is not an issue at all on explicitly created lines, since the caret position is easily decided upon
depending if it is preceding the line break, or if it's following one. This property is only used for implicitly
created lines.
Update the caret position to match the caret index.
preferNextLine
Determines if, in case text wraps over the new line, and the caret is in an ambiguous position, the caret will move to the next line, or stay on the previous one. Usually false, except for arrow keys and the "home" key.
In cases where the text wraps over to the new line due to lack of space, the implied line break creates an ambiguous position for the caret. The caret may be placed either at the end of the original line, or be put on the newly created line:
Depending on the situation, either position may be preferable. Keep in mind that the caret position influences further movement, particularly when navigating using the down and up arrows. In case the caret is at the end of the line, it should stay close to the end, but when it's at the beginning, it should stay close to the start.
This is not an issue at all on explicitly created lines, since the caret position is easily decided upon depending if it is preceding the line break, or if it's following one. This property is only used for implicitly created lines.