[TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 6022
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *white »

(not a new bug)
* View a text file containing a url (F3 View)
* Right-click the url
* Click somewhere on the white space beyond the line length
* It is not visible (beside that the cursor moves to the wrong line), but now the CR LF characters are selected. For example, you can open the context menu and copy them.
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *petermad »

Confirmed.
But only if i click beyond the line length WITHOUT closing the context menu first (with Escape)
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 6022
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *white »

So it happens when the context menu is shown, doesn't matter if it's for a url or for other text.
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *petermad »

doesn't matter if it's for a url or for other text
Confirmed.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *ghisler(Author) »

I cannot reproduce that. When I click behind the line, the cursor jumps to the end of the line. Nothing else happens. Maybe it depends on the file?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6022
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *white »

ghisler(Author) wrote: 2025-06-18, 20:13 UTC I cannot reproduce that. When I click behind the line, the cursor jumps to the end of the line. Nothing else happens. Maybe it depends on the file?
Perhaps a video helps.
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *petermad »

2ghisler(Author)

You have to click behind the line WHILE the context menu is visible.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
siealex
Senior Member
Senior Member
Posts: 316
Joined: 2009-03-22, 16:36 UTC

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *siealex »

Confirmed. Note, you must click on the SAME line where the URL is, but to the right of the open context menu.
Paste this into a new text file:

Code: Select all

text text 
https://google.com/
text text text
and save. Then open this file with F3, right-click on the URL, then click on the same exact line beyond the text.
Image: https://i.ibb.co/zHNFpx5Y/4554.jpg
Don't click anywhere else, but press Ctrl+C.

Next open any text editor that supports invisible characters (e. g. Notepad++) and press Ctrl+V.
Image: https://i.ibb.co/B2s6rfsm/image.png
We are not so S.M.A.R.T. as we imagine...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *ghisler(Author) »

You have to click behind the line WHILE the context menu is visible.
Oh, I see, I missed that.

I checked this in the debugger: Windows is sending a WM_MOUSEMOVE message when the context menu gets closed, but after sending the WM_LBUTTONDOWN message. So the same happens as when you press the left mouse button, move the mouse a bit, then release the mouse button: TC selects the line break.

Why does it select the line break? When you click on a character and drag to the left, TC selects the line from the click position to the new mouse position. If you move beyond the end of the line, it includes the line break in the selection. Windows Notepad does that too! But Notepad seems to disable selection when clicking while a context menu is open. I tried adding this by listening to WM_UNINITMENUPOPUP or WM_EXITMENULOOP, but Windows isn't calling them. So for now I cannot prevent this from happening, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *ghisler(Author) »

I found a partial solution: The mouse coordinate from "mouse down" and "mouse move" are exactly the same. When I ignore mouse move messages with the same coordinates, the problem doesn't occur.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.55 final, please check it!
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *petermad »

history.txt wrote:22.06.25 Fixed: Lister: Clicking behind a line of text while a context menu was up selected the line break behind that line (32/64)
Confirmed fixed in TC 11.55 final :-)
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 6022
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *white »

Hmm.. Tested with 32-bit and 64-bit TC 11.55:
It still happens sometimes. Perhaps if you click and quickly move the mouse a little?

Edit:
Yes, that seems to be it. But it's unrelated to the issue that was fixed. Any drag after a line ending selects the newline.
So I think fixed.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50934
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.55rc7] Lister: after right-clicking a url, clicking after end of line selects newline

Post by *ghisler(Author) »

Thanks for confirming the fix!
The only way to prevent the selection of the line break would be to complete disable selection when clicking while the context menu was up. Unfortunately I couldn't find a way to implement this, so here is the second best solution.

Moderator message from: ghisler(Author) » 2025-06-26, 08:14 UTC

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply