Select multiple words/lines when double/triple clicking.#5127
Select multiple words/lines when double/triple clicking.#5127RobertP-McDowell wants to merge 3 commits into
Conversation
ossilator
left a comment
There was a problem hiding this comment.
the commit messages lack explanations/justifications of the changes.
also, judging by the commit message, the 2nd commit mixes two unrelated changes.
|
I made each commit message clearer, and I thought changing the click time delay was an important enough change to warrant a third commit after all, so I split up the 2nd commit into two. |
|
I changed the functionality a bit so double clicking will always select at least one character in my last force-push, and resolved the reviewed changes. Thanks. |
|
Thanks! Double click to select a word and a triple click to select a line work fine. But the descriptions of the 2nd commit is unclear for me.
Could you please describe how it should work? |
This is an improvement to double clicking in the editor, allowing the user to select multiple words by dragging the mouse. Previously, the user could only select one word at a time by double clicking. Signed-off-by: Robert P. McDowell <teatimewithrobert@gmail.com>
Improves triple clicking in the editor, allowing the user to select multiple lines after a triple-click by dragging the mouse. Previously, the user could only select one line at a time after triple clicking. Signed-off-by: Robert P. McDowell <teatimewithrobert@gmail.com>
This is to compliment the last two commits. Before if the user dragged their mouse and tried to immediately click, they might unintentionally initiate a double click; after triple clicking was re-implemented it was a noticabely bigger issue, with accidental triple clicks. Fix it by starting the click timer on an earlier input. Signed-off-by: Robert P. McDowell <teatimewithrobert@gmail.com>
Proposed changes
Quality of life feature for mouse users. Many text editors have the ability to drag select words and lines, and mcedit already allows you to select one word at a time, this is just an improvement of what's already there!
Also updated how the delay between clicks works to start the timer on mouse down instead of up, this is a lot more common in text editors (your very browser probably behaves this way); this change affects all other widgets that use double-click functionality.
Checklist
git commit --amend -smake indent && make check)Tested with both gpm and xterm-only mouse support, ncurses, and slang.