[TxMt] cursor page up

Allan Odgaard allan at macromates.com
Sat Dec 4 00:50:01 UTC 2004

On Dec 3, 2004, at 14:33, M Spreij wrote:

> Is there a way left to move the cursor to the top of the window? 
> Pageup used to do this, and while I understand that it's not HIG or 
> like other apps do it

I haven't found any mention of this in AHIG myself -- I'm quite sure 
that the reason Apple's native text fields does it is laziness. They 
center the caret in the display each time it gets out of the visible 
region, so (move) page up/down simply moves the caret “visible lines” 

Another place where this is IMHO a bigger disadvantage is how when the 
caret just goes a single line outside the visible text, the buffer 
scrolls half a page. Luckily no-one has complained that TM also break 
this behavior ;)

Regarding reinstating the old behavior, you can change the action 
methods for the page up/down keys to movePageUp: and movePageDown:.

So there's basically 3 behaviors:
  movePageUp/Down:   -- old behavior
  scrollPageUp/Down: -- move only scroll bar, not caret
  pageUp/Down:       -- move caret a full page and center it

More information about the textmate mailing list