-Lister: ANSI vs. ASCII depends on prev. file

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

-Lister: ANSI vs. ASCII depends on prev. file

Post by *Hacker »

Hi *.*,
Take the attached .b64 file and extract it, you should get files 1.txt and 2.txt.
Using a clean INI:
- select both files and press F3
- 1.txt opens in Lister as ASCII
- press N
- 2.txt is displayed as ASCII
- close Lister
- deselect both files
- focus 2.txt
- press F3
- 2.txt is displayed as ANSI

Expected: ANSI vs. ASCII detection should not depend on the previously displayed file.
Similar behavior can be observed when looking at 1.txt using Quick view and moving the cursor to 2.txt.
Checked in both 8.51RC2 32-bit and 64-bit.

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="files.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="files.zip"

UEsDBBQAAgAIAERzTkQGfMarWAAAAFgAAAAFAAAAMS50eHQNy7ENwyAQRuE+knf4J8gKqdNYlpjg
DL8AhdwhfC68RpKBQ/WKp28lEwQ+JL6qZuj53jkey21rlIOIxWzGC/ENLppkJDzVPw2h1N6n+cEN
XS7Mi0yHKe9/UEsDBBQAAAAAACtzi0TCQSQ1AwAAAAMAAAAFAAAAMi50eHRhYmNQSwECFAAUAAIA
CABEc05EBnzGq1gAAABYAAAABQAAAAAAAAAAACAAAAAAAAAAMS50eHRQSwECFAAUAAAAAAArc4tE
wkEkNQMAAAADAAAABQAAAAAAAAAAACAAAAB7AAAAMi50eHRQSwUGAAAAAAIAAgBmAAAAoQAAAAAA
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.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

AFAIK when you switch to hex view in quick view panel, TC keeps this mode between files, so maybe here same thing is applied.

However behaviour is not constistent: when TC calls plugins, view mode is not preserved, also when I switch to text file, TC switches to text view.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

"N" is not the same as loading a new file, it tries to keep previous mode if the type cannot be determined.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
"N" is not the same as loading a new file, it tries to keep previous mode if the type cannot be determined.
Well, I consider this as a bug at least when using Quick view. I don't think it should keep the previous mode when switching files.
I also disagree about keeping the mode when using "N" in Lister but I don't use the "N" key in Lister, so I do not care that much about that specific scenario.

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.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

What if I want to view multiple files in same mode? E.g. hex or Unicode (when there is no BOM)? Such feature may be very useful. However it should be more consistent: ignore previous mode if some option is disabled or keep strict mode (and ignore plugins) if option is enabled. In case of Lister this option may be added to menu, but what's with quick view?..
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

MVV,
What if I want to view multiple files in same mode?
Well, I would never expect Lister to decide for me when to keep the mode and when not to. But in case somebody really uses this feature we could perhaps introduce a simple "Keep mode" or "Lock mode" menu item in Lister. The question is if it would reset automatically after closing Lister or if it would need to be deactivated manually.

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.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I see, we need two lock options: one for view mode and other one for current file (in quick view)... another nice option would be auto-scroll logs to the end:) but it is a question how to switch such options in quick view, maybe via shortcuts but plugins may catch them... internal commands?
Post Reply