Benno Schulenberg wrote:
> The cursor beviour of <PageUp> is a little strange.  After doing
> info info, N, 6, End, then a series of PageUp puts the cursor at
> the following places: top, bottom, top, bottomish, top, middlish
> (on a 33-line 80-column Konsole).

When scrolling half a window, it makes sense to maintain the textual 
position of the cursor.  But when scrolling nearly a full window, 
it is nicer to have the cursor in a predictable place, in always 
the same spot.

Since during scrolling page after pagefull down the cursor always 
sits in the top-left corner, it makes most sense to put it there 
too after scrolling a page up.  This also makes it easier to <Tab> 
to a crossreference somewhere in the page, compared to having the 
cursor near the bottom half of the time.

If this new cursor positioning makes sense, it can be achieved by 
inserting the following statement at the end of _scroll_backward(), 
and before the return statement ten lines earlier:

  window->point = (window->line_starts[window->pagetop]
                   - window->node->contents);

The preceding "info_beginning_of_node (window, 1, 0);" can then be 
elided and the two ifs contracted to:

  if ((backward_move_node_structure (window, behaviour) == 0)
      && cursor_movement_scrolls_p)
    info_end_of_node (window, 1, 0);

Benno


Reply via email to