Skip to content

Select multiple words/lines when double/triple clicking.#5127

Open
RobertP-McDowell wants to merge 3 commits into
MidnightCommander:masterfrom
RobertP-McDowell:master
Open

Select multiple words/lines when double/triple clicking.#5127
RobertP-McDowell wants to merge 3 commits into
MidnightCommander:masterfrom
RobertP-McDowell:master

Conversation

@RobertP-McDowell

@RobertP-McDowell RobertP-McDowell commented Jun 14, 2026

Copy link
Copy Markdown

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 (you're very browser probably behaves this way); this change affects all other widgets that use double-click functionality.

  • Resolves: #... (No prior issue I could find)

Checklist

  • I have referenced the issue(s) resolved by this PR (if any)
  • I have signed-off my contribution with git commit --amend -s
  • Lint and unit tests pass locally with my changes (make indent && make check)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

Tested with both gpm and xterm-only mouse support, ncurses, and slang.

@github-actions github-actions Bot added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Jun 14, 2026
@github-actions github-actions Bot added this to the Future Releases milestone Jun 14, 2026

@ossilator ossilator left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the commit messages lack explanations/justifications of the changes.

also, judging by the commit message, the 2nd commit mixes two unrelated changes.

@RobertP-McDowell

RobertP-McDowell commented Jun 14, 2026

Copy link
Copy Markdown
Author

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.

Comment thread src/editor/edit.c Outdated
Comment thread src/editor/edit.c Outdated
Comment thread src/editor/edit.c
Comment thread src/editor/edit.c
Comment thread src/editor/editwidget.c Outdated
This is an improvement for double clicking in the editor, allowing
the user to drag to select multiple words. Previously the user could
only select one word at a time by double clicking.

Signed-off-by: Robert P. McDowell <teatimewithrobert@gmail.com>
Like the last commit, improves triple clicking to allow the user
to drag select multiple lines on double clicking in the editor.

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; with triple click being
re-implemented it was a bigger issue, with accidental triple clicks.

Signed-off-by: Robert P. McDowell <teatimewithrobert@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Needs triage by maintainers prio: medium Has the potential to affect progress

Development

Successfully merging this pull request may close these issues.

3 participants