cherrytree icon indicating copy to clipboard operation
cherrytree copied to clipboard

Mouse double click does not select leading and trailing slashes

Open 4njul1 opened this issue 10 months ago • 5 comments

Version, Operative system CherryTree v1.1.2 on Ubuntu v22.04.4

Describe the bug When I select text with leading and trailing slashes with a mouse double click the first and last slash are not selected. For example a double mouse click on /foo/bar/ will only select foo/bar.

Thank you for your work on this great software, I use it daily!

4njul1 avatar Apr 09 '24 07:04 4njul1

On Ubuntu 22.04 I use mouse triple click in CT 1.1.0.

gitvectors avatar Apr 09 '24 13:04 gitvectors

Triple click selects the entire line for me. If I for example want to change the path in a command, I have trouble selecting it with mouse clicks.

4njul1 avatar Apr 10 '24 10:04 4njul1

I would have advised to try and configure in the preferences dialog which characters are included with the double click; the fact though that the middle slash is included and the others are not doesn't seem right, I'll have a look

giuspen avatar Apr 19 '24 16:04 giuspen

I had a look, the non alphanumeric characters are stripped on purpose from the beginning/end. We have to consider for example the case of having the dot configured for selection, when you double click on "one.two." you likely don't want the trailing dot selected. One solution is to hardcode a list of characters that we don't want to strip from the beginning/end, another is to hardcode the only characters that we want to strip from the beginning/end, the third possibility is to allow configurability of not only one list of characters but two. Comments welcome.

giuspen avatar Apr 19 '24 21:04 giuspen

Thanks for having a look into it! I see that in some cases it would make sense to strip these characters from the beginning or end of string. I think a configurable list would be great! I often select absolute paths where it would be nice to have the leading slash included.

4njul1 avatar Apr 26 '24 09:04 4njul1