Article View: news.software.readers
Article #35025Re: slrn/tin: Comparing slrn with tin
From: Olly Betts
Date: Thu, 10 Jul 1997 00:00
Date: Thu, 10 Jul 1997 00:00
69 lines
2636 bytes
2636 bytes
In article <ED24J3.6n6@world.std.com>, Peter F Davis wrote:
>I like the fact that tin's numbers don't change when I scroll down.
Try this patch (for slrn 0.9.4.2). The issue of what to do when the numbers
go past 99 could do with attention. Currently the header display just
offsets by 1 after 99 (and 2 after 999, etc). And it obviously needs to
be made optional.
The numbers are always contiguous, so they change if you change sort order,
expand/collapse threads, or expunge read articles. Note that you can go to
an article number on an earlier page, but not on a later one.
--- art.c.base Tue Jul 8 12:24:32 1997
+++ art.c Thu Jul 10 14:25:57 1997
@@ -68,6 +68,8 @@
/*{{{ extern Global variables */
+static int header_number_offset;
+
SLKeyMap_List_Type *Slrn_Article_Keymap;
char *Slrn_X_Browser;
char *Slrn_NonX_Browser;
@@ -3291,7 +3302,7 @@
if (ich != '\r')
SLang_ungetkey (ich);
- diff = i - Last_Cursor_Row;
+ diff = i - header_number_offset - Last_Cursor_Row;
if (diff > 0) slrn_header_down_n (diff, 0); else slrn_header_up_n (-diff, 0);
#if SLRN_HAS_SLANG
SLang_run_hooks ("header_number_hook", NULL, NULL);
@@ -7168,8 +7179,8 @@
if (Slrn_Use_Header_Numbers)
{
slrn_set_color (HEADER_NUMBER_COLOR);
- SLsmg_printf ("%2d", row);
- if (row > Largest_Header_Number) Largest_Header_Number = row;
+ SLsmg_printf ("%2d", row + header_number_offset );
+ if (row + header_number_offset > Largest_Header_Number) Largest_Header_Number = row + header_number_offset;
}
else smg_write_string (" ");
#endif
@@ -7468,6 +7479,16 @@
if (Slrn_Full_Screen_Update)
{
+ Slrn_Header_Type *h2;
+ header_number_offset = 0;
+
+ h2 = h;
+ while (h2->prev != NULL)
+ {
+ h2 = h2->prev;
+ if ((h2->flags & HEADER_HIDDEN) == 0) header_number_offset++;
+ }
+
for (row = 1; row <= height; row++)
{
SLsmg_gotorc (row, 0);
Cheers,
Olly
--
Don't send a man to do a buoy's job.
Technical Details
Message-ID:
<slrn5s9vlh.ccj.olly@noxious.muscat.co.uk>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-mailReferences:
<ED24J3.6n6@world.std.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn5s9vlh.ccj.olly@noxious.muscat.co.uk> Subject: Re: slrn/tin: Comparing slrn with tin Date: Thu, 10 Jul 1997 00:00:00 +0000 From: olly@muscat.co.uk (Olly Betts) References: <ED24J3.6n6@world.std.com> 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: 255980094 Mail-Copies-To: always Organization: Muscat Ltd -- http://www.muscat.co.uk/ Newsgroups: news.software.readers