triple-click to select quoted string #1364
Labels
No labels
bug
compositor
doc
duplicate
easy
enhancement
help wanted
invalid
not-a-bug
performance
question
refactor
regression
upstream
what do you think?
wiki
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: dnkl/foot#1364
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are different conventions on what "double-click" means out there. Typically, it means "select word". But what about triple-click? Currently, in foot, it selects a whole line.
But in some other programs (for example rxvt does this), triple-click selects the content of a quoted string, and to select the whole line you click another time (so "quadruple click").
For example, given the above paragraph, if I put my mouse on the word "quadruple" and:
quadruplequadruple click)., but varies according to terminal widthI have tried to find some standard reference on this and, unsurprisingly, it's not standard at all. This stack overflow discussion says that the triple-click is application dependent. The wikipedia page gives a few examples, mostly showing triple-click selecting a line.
The Apple HIG explicitly says:
... which I think "select text contained in quotes" would qualify.
It's a delicate balance, one question is what to do if no double-quotes is found. In this case, interestingly, rxvt just reverts back to the original behaviour which is to select the entire line on triple-click.
It might seem confusing at first, but I have found that it works surprisingly well. If the entire line doesn't get selected at first, your brain quickly gets into the habit of mashing that mouse button until it selects what you want.
I've even seen setups where quadruple-click would select the quotes as well as the contained string, so you would get:
quadruplequadruple click"quadruple click")., but varies according to terminal widthand yes, that gets a bit ridiculous, but it still works! :)
I personally think triple-click to select the text inside the quotes, and fallback to the entire line, strikes the perfect balance. Five clicks to select a line is a bit much...
I'm also thinking it might be worth adding an option that defines the quote characters. For example, one might want single quotes, double quotes, parenthesis, brackets etc to act as quotes. Of course, only matching quotes would be selected.