#79 Page Up/Page Down Cursor Behaviour

closed
nobody
None
5
2004-11-12
2004-11-08
tristen
No

If I'm in the middle of typing a line of code and I
press "page up" or "page down" once (or many times) in
order to refer to code a few pages away, it would be
nice if the cursor would return to exactly the same
column prior to me pressing page up or page down.

Currently it seems the default behaviour is to place
the cursor at the beginning of the line whenever page
up or page down is pressed.

I understand the latter (current) behaviour may be
preferred by some, so, if this change were to be
introduced, it seems it would be best to implement it
as an option.

Discussion

  • Joerg Fischer
    Joerg Fischer
    2004-11-08

    Logged In: YES
    user_id=918104

    It is an option already. From the online manual:

    next_page( ["stutter"] ["column"] ["scrollbar"] ["nobell"] )
    Moves the cursor and scroll forward one page. The parameter
    "stutter" moves the cursor to the bottom of the display,
    unless it is already there, otherwise it will page down.
    The parameter "column" will maintain the preferred column
    while moving the cursor.

    The same holds for previous_page(). So, all you have to do
    is to change the keybinding a little:

    NEdit*text.Translations: #override \n\ <Key> osfPageDown : next_page("column")\n\ <Key> osfPageUp : previous_page("column")\n

    Please read the online manual (X resources, Key binding,
    Action routines, etc.). It is all there - and much more!

     
  • Thorsten Haude
    Thorsten Haude
    2004-11-12

    • status: open --> closed
     
  • Thorsten Haude
    Thorsten Haude
    2004-11-12

    Logged In: YES
    user_id=119143

    To elaborate: The behavior you describe is the default
    behaviour. Someone probably changed the keybindings to a
    plain next_page().

    Let us know if anything is missing from the online manual.

     
  • Joerg Fischer
    Joerg Fischer
    2004-11-18

    Logged In: YES
    user_id=918104

    >To elaborate: The behavior you describe is the default
    >behaviour.

    From the text.c released as 5.5:
    /* PageUp */
    yaddayadda
    "~Alt ~Shift ~Ctrl ~Meta<KeyPress>osfPageUp: previous_page()\n"

    /* PageDown */
    yaddayadda
    "~Alt ~Shift ~Ctrl ~Meta<KeyPress>osfPageDown: next_page()\n"

    So I would say "column" isn't the default behaviour ;-)

     
  • Thorsten Haude
    Thorsten Haude
    2004-11-18

    Logged In: YES
    user_id=119143

    Doh. You're right, I only translated that from the other
    cursor movements.

    Ok, at least it *should* be default.