🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #54666

Re: Slrn: How to scroll header index whilst maintaining cursor position

#54666
From: Dawn Owens-Nicholson
Date: Mon, 29 Nov 1999 00:00
49 lines
3140 bytes
Even Holen wrote:
> So my question is: Are there any more elegant solution besides pressing
> 'h' twice?   (For those using vi: Something along the lines of 'z<ret>')

I think slrn (or perhaps S-Lang) draws the screen differently depending on
how many keystrokes are buffered.  If you have, say, a lot of down-arrow
keystrokes in the buffer and you're looking at a long header list that will
have to scroll to fulfill your command, slrn will end up centering the
cursor after all the keystrokes are processed.

I thought of a nice way to express what you want, but I think it might best
be done within slrn rather than as a macro.  In your slrn.rc, you'd say:

   set header_scroll_region [some non-negative integer n where:
                             0 <= n <= (SCREEN_HEIGHT-3)/2]

This number would determine the number of header rows between the top (if
scrolling up) or bottom (if scrolling down) of the header list and the
cursor.  You could set this to 0 if you wanted the cursor to traverse the
/entire/ visible section of the header list or set it to the max (whatever
(SCREEN_HEIGHT-3)/2 is for you) if you wanted the cursor to never move from
the center row (the list scrolls to make the cursor move to the right
place).  Perhaps the only exception to the maximum setting would be if you
were on the first or last page of the header list where the cursor would
have to move away from the center row to keep the header list from showing
empty rows.

The default setting would be how slrn acts now which would be 2 (I'm
guessing based on appearances--it looks like slrn tries to keep at most 2
rows between the list border and the cursor).  If I may digress for a
moment, a similar thing would be nice to have for article_scroll_region that
would specify how many duplicated lines there are between pages. Setting
this to 3 would mean:

   The last 3 lines of the body would appear on the top of the next page
   when you page down.

   The previous 3 lines of the body would appear on the bottom of the
   previous page when you page up.

The allowable settable range for this is 0 through the number of lines in
the article window minus 1 (you'd want to make /some/ progress when you hit
spacebar or "b").  This would subsume the scroll_by_page slrn.rc setting
(does anyone use this?) because you could set this to always scroll a line
at a time.

There are probably better names for these settings.

Technical Details
Message-ID: <slrn845kc6.k96.bluemoon@ux6.cso.uiuc.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn845336.1g5.evenh+njus@ai.pvv.ntnu.no>

Show Full Headers
Complete Article Headers
Message-ID: <slrn845kc6.k96.bluemoon@ux6.cso.uiuc.edu>
Subject: Re: Slrn: How to scroll header index whilst maintaining cursor position
Date: Mon, 29 Nov 1999 00:00:00 +0000
From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson)
References: <slrn845336.1g5.evenh+njus@ai.pvv.ntnu.no>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 554528127
Organization: University of Illinois at Urbana-Champaign
User-Agent: slrn/0.9.5.7 (UNIX)
Newsgroups: news.software.readers