aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-05-13 16:08:54 +0800
committerPo Lu2022-05-13 16:08:54 +0800
commit7dd4e0b72ebb9682f4042a044b4ba5bf494c996e (patch)
treeb70e9f40200e94a7a669c97f6a59e3ef5323a331 /src
parent62d2db341ce7b8b109d5f284adac8e19d0a6965e (diff)
downloademacs-7dd4e0b72ebb9682f4042a044b4ba5bf494c996e.tar.gz
emacs-7dd4e0b72ebb9682f4042a044b4ba5bf494c996e.zip
Improve test for empty help-echo on NS menu bar items
* src/nsmenu.m ([EmacsMenu menu:willHighlightItem:]): Also check if idx is valid.
Diffstat (limited to 'src')
-rw-r--r--src/nsmenu.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 9f4825ac140..5599d519063 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -782,7 +782,7 @@ prettify_key (const char *key)
782 } 782 }
783 /* Just dismiss any help-echo that might already be in progress if 783 /* Just dismiss any help-echo that might already be in progress if
784 no menu item will be highlighted. */ 784 no menu item will be highlighted. */
785 else if (item == nil) 785 else if (item == nil || idx <= 0)
786 help = Qnil; 786 help = Qnil;
787 else 787 else
788 { 788 {