jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re:Flashing (PGUP/Top of File)


On 09/10/2004 at 18:34 jeremy@xxxxxxxxxx wrote:

>When I'm at the top or bottom of a file and try to go further (up or
>down), I get a very irritating screen flash, like a total repaint.
>What's causing this and is there any way to avoid this? I know, don't
>try to exceed the file boundaries, but when hitting PGUP a few times,
>or down it's very easy to do.
>
>Jed does this to me both on my Linux and Windows box.
>
>Thanks,
>
>Jeremy
>
>--------------------------
>To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
>the word "unsubscribe" in the message body.
>Need help? Email <jed-users-owner@xxxxxxxxxxx>.

*********** REPLY SEPARATOR  ***********

I've reassigned the page up/down keys to use the following s-lang functions
to to stop the flashing, beeping and general cubicle-scenario embarrassment
that Jed sometimes causes when being driven through twisty source code at
high speed (although there's no better vehicle for doing that in!):

%==========================================================================
% Page up and centre current line (avoids eye-bending scrolling and 
% doesn't beep when you run into the buffers)
%==========================================================================

define jms_page_up ()
{
   variable rows, pos;

   rows = window_info('r');
   pos = window_line();

   if(rows >= what_line())
      rows = what_line() - 1;

   loop(rows)
      call("previous_line_cmd");

   if(rows > 0)
      recenter(pos);
}

%==========================================================================
% Page down and centre current line (avoids eye-bending scrolling and 
% doesn't beep when you run into the buffers)
%==========================================================================

define jms_page_down ()
{
   variable rows, max_row, pos;

   push_spot();
   eob();
   max_row = what_line();
   pop_spot();

   rows = window_info('r');
   pos = window_line();

   if( (what_line() + rows) > max_row)
      rows = max_row - what_line();

   loop(rows)
      call("next_line_cmd");

   if(rows > 0)
      recenter(pos);
}



-----------------------------------------
John Skilleter - john@xxxxxxxxxxxxxxxx & elsewhere
'DOS is best spelt backwards!'
    http://www.skilleter.org.uk
    http://www.roada.org.uk
-----------------------------------------



--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]