Problem: 1615832

Title: (TTEView) Cursor Key Movement is Deranged

Received: Dec 29 1996 4:37PM


Cursor key movement in MacApp TTEView-based views is deranged as pointed out in the following message from a developer.

- - - - - - - - - - - - - - - - -

I am using MacApp 3.3.

In a Text Edit View type in the following:

a
b
c
d
e
f
g
..
If you place the cursor at the beginning and continually press the down key the cursor will go to:
  1. The beginning of the "b"
  2. The End of the "d"
  3. The Beginning of the "e"
  4. The End of the "g"
  5. ..

Further complicating this is having several blank lines between lines with text. Just try it, you'll see.


Fix:

UTTEView.cp was changed.

DoKeyEvent: There was an off-by-one error in the calculation of the aVPoint. A special case was added to the ++gotoPos to prevent premature increment if the selection was at the top.

OffsetToPt and PtToOffset had special case code which was unnecessary.

OffsetToLine needed a special case check to handle the selection being at the start of a line.