Tracker »

Issue 242 – Selection in file panel does not work on Vista

: GUI
: Unspecified
: Bug
: Medium
: 0
: RESOLVED
: FIXED
: 4.1.4
In Commander interface, WinSCP uses by default Norton Commander-like selection of files. I.e. selection that is not cleared when focus is changed. To implement it, WinSCP needs to prevent unselection of items in list view by triggering LVN_ITEMCHANGING message. This works fine until Windows XP. In Windows Vista there is bug. Once unselection is prevented, list view forgets the selection internally, preventing iteration over selected files. To overcome that, in WinSCP 4.0.4 workaround was implemented. When WinSCP detects Vista OS, it keeps track of selection itself.

But when WinSCP is executed in compatibility mode, it fails to detect Vista. And unfortunately the bug is present even in compatibility mode.
Detection of Vista OS was improved, not to be fooled by compatibility mode:
https://www.thedelphigeek.com/2007/02/four-ways-to-detect-vista.html

The bug in Windows Vista is discussed here:
https://groups.google.com/g/microsoft.public.win32.programmer.ui/c/mCq7jUUPxcE/m/BnnUh4Rqu8wJ