From 7dd4e0b72ebb9682f4042a044b4ba5bf494c996e Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 13 May 2022 16:08:54 +0800 Subject: [PATCH] Improve test for empty help-echo on NS menu bar items * src/nsmenu.m ([EmacsMenu menu:willHighlightItem:]): Also check if idx is valid. --- src/nsmenu.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } /* Just dismiss any help-echo that might already be in progress if no menu item will be highlighted. */ - else if (item == nil) + else if (item == nil || idx <= 0) help = Qnil; else { -- 2.39.2