Line numbers in LISTER
Moderators: Hacker, petermad, Stefan2, white
Line numbers in LISTER
I think that it would be a good and useful idea to have line numbers appreared in the LISTER.
The way I do it now, is thru COMPARE BY CONTENT.
Any suggestions or tweaks on that?
Thanks in advance.
Nick
The way I do it now, is thru COMPARE BY CONTENT.
Any suggestions or tweaks on that?
Thanks in advance.
Nick
have a look at fabulous SCHMaster's plugin SynUs (ex-BorlandViewer)
and read the thread about it : http://ghisler.ch/board/viewtopic.php?t=44
SynUs can show line numbers... and so much more !!!
and read the thread about it : http://ghisler.ch/board/viewtopic.php?t=44
SynUs can show line numbers... and so much more !!!
Benoît
# 4081
# 4081
Lister doesn't show line numbers because it would have to read the whole file to determine what line it is on (eg when you search in lister or drag the scroll bar) and that would be slow compared to as it is now, just reading the portion of the file the Lister is at.
HTH
Roman
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- André Martin
- Senior Member
- Posts: 245
- Joined: 2003-02-05, 15:46 UTC
- Location: Dresden, Germany
What about a setting in the IniFile:
ShowLineNumbersOnlyWhenFilesIsSmallerThen: 100000
ShowLineNumbersOnlyWhenFilesIsSmallerThen: 100000
Browse the web with the HTTP SmartBrowserPlugin
Check your mails with the POP3/SMTP EmailPlugin!
Check your mails with the POP3/SMTP EmailPlugin!
- André Martin
- Senior Member
- Posts: 245
- Joined: 2003-02-05, 15:46 UTC
- Location: Dresden, Germany
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The current implementation of Lister is optimized to show files of ANY size (whatever is supported by the file system, up to 2^64 bytes) almost instantaneously. To show line numbers, TC would have to read the whole file into memory (or at least count the line breaks) from the beginning of the file up to the current location. You can see what this means if you try to open a several 100 MB log file in a text editor.
Therefore the display of line numbers will be left to Lister plugins.
Therefore the display of line numbers will be left to Lister plugins.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, but this would mean that I would have to program two completely different lister engines, one which works as it is now, and the other which is used only for small files and loads everything into memory. At the moment, I don't have the time to do this - and it can be done very well with lister plugins! So why re-invent the wheel?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
How about a key in Lister to (re)load the file and show the line numbers? This way the user could decide when to show and when not. Would this require a new engine, too?
TIA
Roman
TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately yes. But what you suggest will be possible with plugins in TC 5.51.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com