Lister : txt files context menu lacks url entries

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

Moderators: Hacker, petermad, Stefan2, white

PascalT
Junior Member
Junior Member
Posts: 48
Joined: 2015-08-27, 08:00 UTC

Lister : txt files context menu lacks url entries

Post by *PascalT »

TC11.55RC6
Win XP 32bit and Win 10 64bit

When a file is opened and auto-detected as text only in lister, the right-click menu on a url sometimes does not have the 2 URL related entries "open in default browser" and "Download target as".

How to reproduce :
Create a txt file with a url on the first line, a url on the second line (it may be the same one), and a carriage return.
Open it in lister.
The right click menu of the first url has all entries, the right click menu on the second url lacks 2 entries.

The final carriage return is important because without it there's no problem with both urls.
PascalT
Junior Member
Junior Member
Posts: 48
Joined: 2015-08-27, 08:00 UTC

Re: Lister : txt files context menu lacks url entries

Post by *PascalT »

Note that a file containing only one url without carriage return is detected as binary (which is normal) and the right click menu has all entries.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister : txt files context menu lacks url entries

Post by *ghisler(Author) »

I cannot confirm that. My guess is that you had some other text selected when right clicking on that second URL.

Total Commander only selects an URL when nothing is currently selected, and it only shows these two entries when an URL is selected. So when something else (no URL) is selected and you right click on an URL, it will not be selected and you will not get these two entries.

Please provide more details if you can still reproduce the problem with nothing selected. I tried with a file containing just:
https://www.ghisler.com<line break>
https://www.ghisler.ch<line break>
in both Windows <cr><lf> and Linux/Unix format <lf>.
Author of Total Commander
https://www.ghisler.com
PascalT
Junior Member
Junior Member
Posts: 48
Joined: 2015-08-27, 08:00 UTC

Re: Lister : txt files context menu lacks url entries

Post by *PascalT »

In fact it depends on the way you select a line.
If you select a line with a drag of the left clicked mouse, the menu is always complete.

If you select the first line with a triple left click, the menu is complete.
But if you select the last line with a triple click, the menu is not complete. Is seems that something else is in the selection and the url is not recognized.
Maybe the triple click can be fixed in lister ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister : txt files context menu lacks url entries

Post by *ghisler(Author) »

I will check it. Btw, you don't need to select the URL! Total Commander will select it automatically when you right click on it.
Author of Total Commander
https://www.ghisler.com
PascalT
Junior Member
Junior Member
Posts: 48
Joined: 2015-08-27, 08:00 UTC

Re: Lister : txt files context menu lacks url entries

Post by *PascalT »

ghisler(Author) wrote: 2025-06-17, 08:19 UTC Btw, you don't need to select the URL! Total Commander will select it automatically when you right click on it.
Magical ;-) ! I hadn't noticed !

The explanation is that the triple click on the last line of the file selects the next carriage return, if any.
It doesn't select it for other lines.
Lister behaves like this for any content (url or not).
so there's just some inconsistency in the selection with triple click when it's the last line or another line in the text.
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Lister : txt files context menu lacks url entries

Post by *white »

ghisler(Author) wrote: 2025-06-17, 08:19 UTC .. Btw, you don't need to select the URL! Total Commander will select it automatically when you right click on it.
That's not entirely accurate. Right-clicking on the first character, or opening the context menu with the keyboard when the cursor is on the first character, does nothing. That's why I suggested this text on my suggestion for an improved help page for Lister:
If no text selected

The context menu can only be opened on a URL (starting from its second letter onward). When doing so, the URL is selected and the menu opens.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister : txt files context menu lacks url entries

Post by *ghisler(Author) »

I hope that I will find the time to revise that help page once the beta test is over, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Lister : txt files context menu lacks url entries

Post by *white »

ghisler(Author) wrote: 2025-06-17, 12:51 UTC I hope that I will find the time to revise that help page once the beta test is over, sorry.
That's OK, that was not the point I was trying to make. What's the reason why richt-clicking the first letter of an URL doesn't work?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister : txt files context menu lacks url entries

Post by *ghisler(Author) »

It's an error due to how URLs are found: The code first looks to the left to find the start of the URL, then to the right to find the end. It doesn't handle the special case where the click already was at the start of the URL.
Author of Total Commander
https://www.ghisler.com
PascalT
Junior Member
Junior Member
Posts: 48
Joined: 2015-08-27, 08:00 UTC

Re: Lister : txt files context menu lacks url entries

Post by *PascalT »

Have you found a way to fix the triple left click selecting the next carriage return on the last line of a file and not on the others ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister : txt files context menu lacks url entries

Post by *ghisler(Author) »

Yes I have, thanks for reporting it!
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister : txt files context menu lacks url entries

Post by *ghisler(Author) »

This should be fixed in RC7, please test it!
17.06.25 Fixed: Lister: Right-clicking on the first character of a URL did not select the URL, only right-clicking on the second character and beyond did (32/64)
17.06.25 Fixed: Lister: Triple click on last line in a text file selected the line including a line break at the end (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5988
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Lister : txt files context menu lacks url entries

Post by *white »

Tested OK using TC 11.55rc7 32-bit and 64-bit.
It now also works when urls are at the end of the file (when there is no newline character at the end).
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Lister : txt files context menu lacks url entries

Post by *petermad »

Confirmed fixed in TC 11.55rc7 :-)
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
Post Reply