Compare By Content not working without marking files

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
RADiCAL
Junior Member
Junior Member
Posts: 73
Joined: 2003-10-16, 18:57 UTC

Compare By Content not working without marking files

Post by *RADiCAL »

The bug occurs when I click on File -> Compare By Content.
I am not sure this is a pure TC9.50 beta bug, but I really did not know when the old behavior (comparing files even without marking them) stopped working.
I am using Win10x64 with TC9.50b7 in Dark Mode and I tested also with 9.50b6 and 9.50b3 and the results were identical.
It also occurs with Dark Mode disabled.

I thought it was somehow related to the InactiveFocus=1 or SelectionFocus=$4000000 directives that I have been using a few months, so I tried removing them and got the same results.
I searched the forum and version history changes list and could not find any related notes or topics.

While trying to figure out the cause of it, I did several other tests that resulted in unexpected behavior.
* I tested different paths on the file lists as well as different ones.
* I tested inactive vs. active file list with different cursor location.
* I tested with and without marking files.

Conclusions:
1. Compare contents window will load content of both files only if at least the inactive pane has at least one marked file.
2. In Compare contents - in cases where contents are not loaded, clicking Compare might result differently according to the file on the cursor position on either or both panes.

Here are a few examples of what I tested.
The initial state is Compare contents window with no content loaded and then on each case, I clicked the Compare button:
- a. [two file list panes are open on the same path, different files under the cursor] a msgbox is displayed that the two files are identical and then the content of the file on the active file list (in the main TC window) will be loaded to both Compare contents window panes.
- b. [same as a, but the ".." on the inactive file list is under the cursor] same result.
- c. [same as b, but instead, ".." is under the cursor in the active file list whereas a valid file or ".." is under the cursor of the inactive file list] a msgbox will be displayed that the left file is not found (the path boxes are empty).
- d. [different paths] the path under the cursor on the active file list will be displayed. A msgbox will be displayed regarding the right/left file not found respectively.

Expected behavior (as I recall it): the Compare By Content compares the files under the cursor on both file lists.
User avatar
petermad
Power Member
Power Member
Posts: 14793
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Compare By Content not working without marking files

Post by *petermad »

Expected behavior (as I recall it): the Compare By Content compares the files under the cursor on both file lists.
That's not correct.

And I see no difference from previous TC versions.

Here are the rules:
if no files are selected in both active and inactive panel, then TC will compare the file under the cursor with a file with the SAME NAME in the opposite panel. if no such file exist in the opposite panel it will open the compare-by-contents windows with only the file under the cursor in the active panel loaded.

If no file is selected in the active panel and one or more files are selected in the inactive panel, then TC will compare the file under the cursor in the active panel with the FIRST selected file in the inactive panel.

If one file is selected in the active panel and one or more files are selected in the inactive panel, then TC will compare the selected file in the active panel with the FIRST selected file in the inactive panel.

If more that one file is selected in the active panel, then TC will compare the TWO FIRST selected files in the active panel (also if there are files selected in the inactive panel).

FIRST selected means - as files are shown, so if the sort order is changed, the FIRST selected might change too.

The position of the cursor in the inactive panel NEVER has any influence on what is compared. The position of the cursor in the active panel only matters if NO files are selected in the active panel
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
RADiCAL
Junior Member
Junior Member
Posts: 73
Joined: 2003-10-16, 18:57 UTC

Re: Compare By Content not working without marking files

Post by *RADiCAL »

Understood completely.
Thank you for your time explaining this, petermad, and sorry for all the hussle.
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Compare By Content not working without marking files

Post by *Hacker »

[mod="Hacker"]Moved to the English forum.[/mod]
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.
Post Reply