FarManager
FarManager copied to clipboard
ContentColumns: Wrong FilePath arg on plugin panels
Far Manager version
3.0.6571
Steps to reproduce + Actual behavior
- For files on plugin panels, the names are provided (1) without their internal path components relative to the panel, and (2) merged with the path of the active real panel.
For example, if you open the archive "c:\temp\tmp.7z" containing the file "\dir1\file1.tmp",
GetContentDataWwill be called for it with the argument "c:\temp\file1.tmp". - However, if the archive is opened from the command line (e.g.,
arc:tmp.7z), thenGetContentDataW/GetContentFieldsWare not called.
Test script:
Panel mode \ Column types: <test>,N
test.moon:
ContentColumns
GetContentFields:(Names)->
for name in *Names
return true if name=="test"
GetContentData:(FullFilename,Names)->
for i,name in ipairs Names
if name=="test"
return [i]: FullFilename
Expected behavior
Unless real files are present on the panel, the use of ContentColumns (at least with the current interface) is meaningless and should be prohibited, as in case 2.
Potentially, support for plugins could also be considered, but this requires discussion and refinement.
@shmuz @zg0