#21920
Stefan
Participant

“Yang Yang” wrote on June 8, 2017 at 9:21 pm
Continuous blank lines are not treated as a block, and the caret cannot be moved to TOF/EOF as advertised. Both are easy to customize, though.

Here is a better code

//JumpToNextBlankLineBelow.jsee (Ctrl+Shift+Arrow-Down)
Redraw = false;
   document.selection.Find("(\\w|\\.)$",eeFindNext | eeFindReplaceRegExp);
if(document.selection.Find("(^\\s*?$)", eeFindNext | eeFindReplaceRegExp)==0){
   document.selection.EndOfDocument();}
   document.HighlightFind = false;
//Redraw = true;

//JumpToNextBlankLineAbove.jsee (Ctrl+Shift+Arrow-Up)
Redraw = false;
   document.selection.Find("(\\w|\\.)$",eeFindPrevious | eeFindReplaceRegExp);
if(document.selection.Find("^[[:blank:]]*?$",eeFindPrevious | eeFindReplaceRegExp)== 0){
   document.selection.StartOfDocument();}
   document.HighlightFind = false;
//Redraw = true;

But unfortunately the visible view doesn’t follow the cursor, if the cursor jumps out of view.

That means:
If the macro finds a line, the cursor is set to that line.
But is that line position is above or below the current visible view,
the windows is not scrolled to that line.

But that happens only with “Redraw = false;” active.
If I comment that command out, the scrolling works again, but the search highlighting is disturbing then.

Tested here with 16.8.1, as 32-bit portable.