@Mr. Ghisler Slider in Lister

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
janv
Junior Member
Junior Member
Posts: 6
Joined: 2004-01-04, 00:13 UTC

@Mr. Ghisler Slider in Lister

Post by *janv »

Dear Mr. Ghisler

Is it possible to make the slider on the right side of the window in LISTER (F3)
proportional to the lenght of the text.

greetings janv
(#11407) Enjoy my English
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I'm not Mr Ghisler, but I'd like to add my comment ;-)
I dont think is will be possible, and I actually hope it will not be implemented, because to determine the length of the slider you have to read the whole file. One of Listers greatest stregths is speed, that is achieved by reading only a small part of the file.
I switched to Linux, bye and thanks for all the fish!
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

I would think some sort of approximate proportional thumbsize could be calculated based on the filesize (available from the operating system), the size of the lister window, and whether wrap is on or not ...at least for text-based files... without having to read the full file.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

JohnFredC wrote:I would think some sort of approximate proportional thumbsize could be calculated based on the filesize (available from the operating system), the size of the lister window, and whether wrap is on or not ...at least for text-based files... without having to read the full file.
That is true, that is the percentage counter in the upper right corner for. But for calculating the slider proportionally, you have to count the lines in the file, thus reading the file. An approximate proportion could be misleading i guess, although i have to admit in most cases it would be correct, as most text files have approximately the same line length.
I switched to Linux, bye and thanks for all the fish!
shammat
Senior Member
Senior Member
Posts: 253
Joined: 2003-04-11, 23:13 UTC

Post by *shammat »

SanskritFritz wrote:as most text files have approximately the same line length.
Source files (Java, C/C++) usually don't ;)
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

"rustic work" scale---

Post by *Clo »

2JohnFredC
:D Hello John!

¤ What do you think about a numbered scale on a side of the window? Like that exists in some text-editors, but simplified?
• I mean: having a step of 5...10 rows?
:wink: A big benefit'ld be that such a scale could work when displaying *.RTF files (?) since the % counter doesn't work at this for a lot of versions?
:?: I don't know what it demandes at programming, but it seems nice...

:mrgreen: Kind regards,
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Source files (Java, C/C++) usually don't
I think in average they do ;-), hardly any of them have lines with more than 140 characters.
What yould really fake a scrollbar proportion is a file with really short lines at the beginning, and then lines with 1000 or so characters at the end.
I switched to Linux, bye and thanks for all the fish!
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

The real issue is about how much accuracy is really required for the thumb size.

I think probably not much.

Perhaps a scrollbar thumbsize could be designated depending on filesize. Small files would have larger thumbs, large files smaller ones, based on a simple lookup table.

Inaccurate, yes, but perhaps not significantly so?
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Perhaps a scrollbar thumbsize could be designated depending on filesize. Small files would have larger thumbs, large files smaller ones, based on a simple lookup table.
I agree, that could be in most cases informative. Now lets wait to Mr Ghisler ;-)
I switched to Linux, bye and thanks for all the fish!
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Misunderstanding...

Post by *Clo »

2SanskritFritz
Hi!
¤ I meant the line number, not the average of the file.

:mrgreen: kind regards,
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2Clo
I meant the line number, not the average of the file.
Lets make this straight: to know how many bytes were read and how many bytes are left to read is possible without reading the whole file. But knowing how many lines are left to read in the file, is only possible if one actually reads the file.
I switched to Linux, bye and thanks for all the fish!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed the slider isn't proportional because the number of lines could only be determined by reading the entire file. Currently the slider goes from 0..1000, which is sort of a percentage (permil) value for the location to which it scrolls.
Author of Total Commander
https://www.ghisler.com
Post Reply