]> git.eshelyaron.com Git - emacs.git/commit
Prevent further cases of duplicated separators in context menus
authorJim Porter <jporterbugs@gmail.com>
Mon, 3 Jan 2022 06:08:52 +0000 (22:08 -0800)
committerJuri Linkov <juri@linkov.net>
Tue, 4 Jan 2022 08:18:15 +0000 (10:18 +0200)
commit3eaf3aeec8a23dda8f9a170909bcc052c3d4ab78
tree889ec53890605c716582325f06c645e301380b3d
parent9651be5b48691ced56230522e10c05a04455e4a3
Prevent further cases of duplicated separators in context menus

In some cases, context menu items are added before the overall prompt
string.  This could cause multiple consecutive separators to appear if
they "surround" the prompt string.  (Bug#52293)

* lisp/mouse.el (context-menu-map): Improve the de-duplication logic
to ignore non-menu-items when checking for consecutive separators.

* test/lisp/mouse-tests.el
(context-menu-map-remove-consecutive-separators)
(context-menu-map-remove-separators-at-beginning-or-end): New tests.
lisp/mouse.el
test/lisp/mouse-tests.el