Odd behavior with Quick Viewer identifying file types
Posted: 17.12.2017, 16:35
I have an odd issue when searching for text through all csproj files (XML files for MSBuild) within a directory tree.
In the search results I select a csproj file and press Ctrl+q to view the matching text in the file. This works fine when the file has a byte-order marker (BOM) and the matching text is shown in the quick viewer pane on the right. However, if the file does NOT include a BOM, it is displayed in a different font (showing colors) but does not scroll to the matching text.
Using the (full) Viewer (F3) indicated the following:
I tried changing the Viewer settings to specify .csproj to be treated as text, but this didn't seem to take effect. The setting would be lost after restarting FreeCommander. I then tried manually editing FreeCommander.ini (after first closing FreeCommander) and adding .csproj to ExtList4TxtView:
The setting then persisted in the ini file but FreeCommander ignored it and still insisted on displaying csproj files (without a BOM) using "Internet" format.
I finally managed to work around the issue by instead adding csproj to ExtList4RtfView:
Can anyone explain what's happening here? Why does text view not work for csproj files, and why do I need to configure them to be viewed as Rtf files so that when I press Ctrl+q the matching search text is scrolled into view and highlighted?
Thanks,
--- John.
In the search results I select a csproj file and press Ctrl+q to view the matching text in the file. This works fine when the file has a byte-order marker (BOM) and the matching text is shown in the quick viewer pane on the right. However, if the file does NOT include a BOM, it is displayed in a different font (showing colors) but does not scroll to the matching text.
Using the (full) Viewer (F3) indicated the following:
- *.csproj file with BOM: displayed in "RTF/Utf-8" format
- *.csproj file without BOM: displayed in "Internet" format
I tried changing the Viewer settings to specify .csproj to be treated as text, but this didn't seem to take effect. The setting would be lost after restarting FreeCommander. I then tried manually editing FreeCommander.ini (after first closing FreeCommander) and adding .csproj to ExtList4TxtView:
Code: Select all
ExtList4TxtView=.txt.ini.log.def.bat.cmd.url.sql.csproj.
I finally managed to work around the issue by instead adding csproj to ExtList4RtfView:
Code: Select all
ExtList4RtfView=.rtf.csproj.
Thanks,
--- John.