Vertical Movement of the Caret
Vertical Movement of the Caret
When TEKey is called for an Up Arrow keyboard event, the caret moves up by
one line each time the user presses the Up Arrow key, even in lines of text
containing fonts of different sizes. Prior to this version of TextEdit, the caret
occasionally skipped a line because it moved up by the height of the largest font
on the current line.
If the line height of the current line is greater than the line height of the
succeeding line and if the caret is positioned at the end of the line, a Down
Arrow event places the caret on the next line. In system software earlier than
this version of TextEdit, the caret remained on the current line.
If the current line corresponds to the first line in the edit record and if
TEKey processes an Up Arrow event, the new caret position is at the
beginning of the text on the first line, at primary caret position 0. This
position corresponds to the visible right end of a line when the primary line
direction is right to left and to the left end of a line when the primary line
direction is left to right.