File compare, extending text selection with mouse has error

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
rif
Junior Member
Junior Member
Posts: 17
Joined: 2005-05-06, 06:24 UTC
Location: Luxembourg

File compare, extending text selection with mouse has error

Post by *rif »

Windows applications allow you to select a block of text (or file listing etc.) then extend the selection by moving the mouse and press shift + mouse click.

In TC that works correctly in file list panels and in text viewer. It does not work correctly in file compare when selecting block to copy.

Steps to reproduce:

1. Make a text file ~80 lines long, save it as test1.txt.

2. Copy test1.txt and name it test2.txt.

3. Edit text2.txt and remove ~50 lines in the middle.

4. Do a file compare (Alt-F + Y) of test1.txt and test2.txt. The extra lines of test1.txt are displayed in red.

5. Select 10 of the red lines. Works OK.

6. Move mouse cursor 5 lines further down.

7. Press shift and mouse-click.

Result: TC forgets the first 9 selected lines and marks lines 10 to 15 in red. Like it was a new selection.

Expected behavior: Lines 1 to 15 should be marked red i.e. extending selection.

Error seen in 9.20b6 but also in 9.12. Tested in 64 bit and 32 bit version. Tested on Win 7 / 64 bit.

Please fix this to use the expected Windows behavior.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

Confirmed
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The compare tool works as you suggest while in edit mode. In read only mode, it always selects from the cursor position to the Shift+Click position. It may be risky to change that now because it could lead to a ton of new bugs.
Author of Total Commander
https://www.ghisler.com
rif
Junior Member
Junior Member
Posts: 17
Joined: 2005-05-06, 06:24 UTC
Location: Luxembourg

Post by *rif »

ghisler(Author) wrote:The compare tool works as you suggest while in edit mode. In read only mode, it always selects from the cursor position to the Shift+Click position. It may be risky to change that now because it could lead to a ton of new bugs.
OK, I understand it will not be corrected for the soon coming 9.20.

Will it then be corrected for future 9.21 release?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, if possible.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File compare, extending text selection with mouse has error

Post by *ghisler(Author) »

Sorry, this hasn't made it into 9.21 yet. It's far too complex, there are many instances where we can miss the position change of the cursor.
Author of Total Commander
https://www.ghisler.com
browny
Senior Member
Senior Member
Posts: 287
Joined: 2007-09-10, 13:19 UTC

Re: File compare, extending text selection with mouse has error

Post by *browny »

5. Select 10 of the red lines. Works OK.

6. Move mouse cursor 5 lines further down.

7. Press shift and mouse-click.
If you clicked the first line and Shift-clicked on the 10th line, the cursor position moves to the 10th line.
When you shift-clicked on line 15, it should select lines 10-15, not 1-15.
That is how Shift+click usually was expected to work in Windows.
To extend selection, standard Windows Ctrl+Shift+click should be tried.
No changes in the code were required, probably.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File compare, extending text selection with mouse has error

Post by *ghisler(Author) »

As I wrote, it's far too complex to fix, I expect several months of testing until all cases of cursor movement are correctly handled. Therefore I prefer to keep it as it is - different from Windows behaviour, but at least consistent.
Author of Total Commander
https://www.ghisler.com
rif
Junior Member
Junior Member
Posts: 17
Joined: 2005-05-06, 06:24 UTC
Location: Luxembourg

Re: File compare, extending text selection with mouse has error

Post by *rif »

@browny
browny wrote: 2018-07-28, 19:57 UTC If you clicked the first line and Shift-clicked on the 10th line, the cursor position moves to the 10th line.
When you shift-clicked on line 15, it should select lines 10-15, not 1-15.
No, shift + mouse-click extends a selection in Windows. The same way as I described the expected behavior.

You can try in Windows File Explorer, in a text in Notepad or any other Windows app. They use shift + mouse click for extending the current selection.

If you answer to my post, please make the quote so it includes user name or use @username to make clear who you answer. Sadly this forum software does not have tree structure view.
Last edited by rif on 2018-08-04, 08:05 UTC, edited 1 time in total.
rif
Junior Member
Junior Member
Posts: 17
Joined: 2005-05-06, 06:24 UTC
Location: Luxembourg

Re: File compare, extending text selection with mouse has error

Post by *rif »

ghisler(Author) wrote: 2018-07-29, 06:52 UTC As I wrote, it's far too complex to fix, I expect several months of testing until all cases of cursor movement are correctly handled. Therefore I prefer to keep it as it is - different from Windows behaviour, but at least consistent.
With TC, when you select files in the file panels it does work the same way as normal Windows app, i.e. shift + mouse-click extends the current selection. So for consistency shift + mouse-click should also extend a text selection in file compare. When you have to make a selection longer than a screen length it is very helpful if it can be done in several steps using extend selection.

I hope you will reconsider and correct the extend text selection for file compare in version 9.22.

Just a side note, I have a registered version of TC for more than 14 years.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File compare, extending text selection with mouse has error

Post by *ghisler(Author) »

Yes, I plan to change it - but there are so many ways to change the state of the editor like typing cursor keys with or without shift, mouse clicking, undo, pasting etc. which would all have an effect on the "select from" position that I just can't add this over night. It will take several weeks to months until it will work properly.
Author of Total Commander
https://www.ghisler.com
rif
Junior Member
Junior Member
Posts: 17
Joined: 2005-05-06, 06:24 UTC
Location: Luxembourg

Re: File compare, extending text selection with mouse has error

Post by *rif »

ghisler(Author) wrote: 2018-08-05, 07:13 UTC Yes, I plan to change it
Thanks, looking forward to see it when it later will be ready.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: File compare, extending text selection with mouse has error

Post by *petermad »

2ghisler(Author)
there are so many ways to change the state of the editor
But it is the behaviour in the non-edit (read-only) mode that needs to be changed - isn't that far les complex?
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File compare, extending text selection with mouse has error

Post by *ghisler(Author) »

Yes, it's almost as complex.
Author of Total Commander
https://www.ghisler.com
browny
Senior Member
Senior Member
Posts: 287
Joined: 2007-09-10, 13:19 UTC

Re: File compare, extending text selection with mouse has error

Post by *browny »

rif wrote: 2018-08-04, 07:16 UTC You can try in Windows File Explorer, in a text in Notepad or any other Windows app. They use shift + mouse click for extending the current selection.
Yes.
Though you still could use Ctrl+Shift+click to extend selection in compare tool.
Post Reply