-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken magic_mode in internal viewer #2976
Comments
|
Thanks for the patch! I think it will help us in #2968.
Branch: 2976_broken_magic_mode. |
Hmm... Sorry, but this patch not really fix Ticket#2090. Just magic mode sometimes work as open file with command. So the examples in Ticket#2090 work after this patch, but the problem still exists. The proble in Ticket#2968 is the same as in Ticket#2090. First mcviewer open the file with external helper (exec_extension_view()), but later just open with magic mode... |
|
|
|
|
Important
This issue was migrated from Trac:
szaszg
(szaszg@….inter.net)gotar@….pl
Reproduce:
=====================
Problem:
======================
magic mode broken in mcview
If we open a file with F3 from panels, then mc use "file extension" style open (e.g. archive.sh) and Format/Raw switching O.K.
If we open file in "Raw" mode, or use quick view, mc opens files without "file extension" helpers. Format/Raw switching broken.
In mcview.c: mcview_load we check magic_mode and detect "compressed" files (line 375).
If magic mode on and file is "compressed" we free the current vpath and generate a new vpath with "decompress magic", but nothing else.
So, the file name disappear and we see the raw content.
After user press F8, mcview reload the file. Now filename is the "new" magic filename. mcview_load open the file with the decompress "helper" (use sfs). We see the uncompressed (parsed) content.
After user press F8, nothing happend, because original file name lost...
Solution:
======================
I attach a patch, wich fix this problem.
The patch:
This patch fix Ticket#2090 (CmdViewFile Raw/Parse switching) but not fix Ticket#2968
Note
Original attachments:
szaszg
(szaszg@….inter.net) onMar 9, 2013 at 3:27 UTC
The text was updated successfully, but these errors were encountered: