File compare, extending text selection with mouse has error
Moderators: Hacker, petermad, Stefan2, white
File compare, extending text selection with mouse has error
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.
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.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
OK, I understand it will not be corrected for the soon coming 9.20.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.
Will it then be corrected for future 9.21 release?
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: File compare, extending text selection with mouse has error
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
https://www.ghisler.com
Re: File compare, extending text selection with mouse has error
If you clicked the first line and Shift-clicked on the 10th line, the cursor position moves to the 10th line.5. Select 10 of the red lines. Works OK.
6. Move mouse cursor 5 lines further down.
7. Press shift and mouse-click.
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.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: File compare, extending text selection with mouse has error
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
https://www.ghisler.com
Re: File compare, extending text selection with mouse has error
@browny
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.
No, shift + mouse-click extends a selection in Windows. The same way as I described the expected behavior.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.
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.
Re: File compare, extending text selection with mouse has error
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.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.
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.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: File compare, extending text selection with mouse has error
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
https://www.ghisler.com
Re: File compare, extending text selection with mouse has error
Thanks, looking forward to see it when it later will be ready.
Re: File compare, extending text selection with mouse has error
2ghisler(Author)
But it is the behaviour in the non-edit (read-only) mode that needs to be changed - isn't that far les complex?there are so many ways to change the state of the editor
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: File compare, extending text selection with mouse has error
Yes, it's almost as complex.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: File compare, extending text selection with mouse has error
Yes.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.
Though you still could use Ctrl+Shift+click to extend selection in compare tool.