Is this too low level for a plugin ?

  • Alex

    Alex - 2014-02-18

    Hey guys, I am thinking of writing a plugin to handle vertical page up/down in a better way than the canned "all editors do like this".
    Let me give the background.... I came accross this implementation on the old, really old DOS Norton Editor and by that time it was already a time and aggravation saver on the 80x25 displays of the past.
    Nowadays with the capability to scale the fonts and increasily gigantic display sizes, it becomes terrible to scroll up and down and see the page just jump and you loose the sight of where you were because the page size can be 50,60,60 lines long, so you know what happens: you have to press page up when the cursor is halfway down, and then re-scrool the page down to put the text in context again.
    What I want the plugin to do is
    - capture the cursor postion when user press page-up or page-down;
    - if the cursor is already at the last top or bottom line then the regular page-up/page-down happens the usual way;
    - if the cursor is not there; just move it to the topmost or bottommost position on the page;
    You will believe how helpful this is only when you try.

    So, finally the question: is this too low level to be handled by a plug-in ?
    If too level how can I go about propsing this feature ?
    If not, then let's put the fingers to work.


  • cchris

    cchris - 2014-02-19

    There are SCI_STUTTEREDPAGEUP/DOWN messages that do exactly what you describe. It's just they don't have a keyboard binding by default. I set Ctrl-Alt-Pgdn/PgUp to send them, and these extra keys do the useful things you mentio. Don't forget to also bind the -EXTEND cousins of those, Ctrl-Alt-Shift-PgDn/Up comes handy then.


    Last edit: cchris 2014-02-22
  • Alex

    Alex - 2014-02-27

    Super awesome !!!!
    I had to also disable SCI_PAGEUP and SCI_PAGEDOWN so the stuttered mode will take over.
    Exactly what I want. Thanks a lot.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks