Skip to content

Ticket #5062: Ignore mouse click on a menu's separator line#5064

Open
egmontkob wants to merge 1 commit intoMidnightCommander:masterfrom
egmontkob:5062-menu-click-on-separator
Open

Ticket #5062: Ignore mouse click on a menu's separator line#5064
egmontkob wants to merge 1 commit intoMidnightCommander:masterfrom
egmontkob:5062-menu-click-on-separator

Conversation

@egmontkob
Copy link
Contributor

Proposed changes

Ignore mouse click on a menu's separator line

Checklist

👉 Our coding style can be found here: https://midnight-commander.org/coding-style/ 👈

  • 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)

@github-actions github-actions bot added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Mar 11, 2026
@github-actions github-actions bot added this to the Future Releases milestone Mar 11, 2026
@egmontkob egmontkob requested review from mc-worker and zyv March 11, 2026 09:43
@zyv zyv added area: tty Interaction with the terminal, screen libraries and removed needs triage Needs triage by maintainers labels Mar 11, 2026
@zyv zyv modified the milestones: Future Releases, 4.9.0 Mar 11, 2026
Copy link
Member

@zyv zyv left a comment

Choose a reason for hiding this comment

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

👍

@zyv zyv added area: core Issues not related to a specific subsystem and removed area: tty Interaction with the terminal, screen libraries labels Mar 11, 2026
return FALSE;

menu = MENU (g_list_nth_data (menubar->menu, menubar->current));
entry = MENUENTRY (g_list_nth_data (menu->entries, y - 2));
Copy link
Contributor

Choose a reason for hiding this comment

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

If entry is NULL, we can immediately return FALSE. Following calculations are not make sense in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

…or line

Signed-off-by: Egmont Koblinger <egmont@gmail.com>
@egmontkob egmontkob force-pushed the 5062-menu-click-on-separator branch from 07be1f9 to 0238700 Compare March 12, 2026 07:47
@zyv
Copy link
Member

zyv commented Mar 12, 2026

:shipit: LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress

Development

Successfully merging this pull request may close these issues.

Menu: Clicking on separator invokes focused entry

3 participants