emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7dd4e0b72e 2/2: Improve test for empty help-echo on NS menu bar i


From: Po Lu
Subject: master 7dd4e0b72e 2/2: Improve test for empty help-echo on NS menu bar items
Date: Fri, 13 May 2022 04:10:01 -0400 (EDT)

branch: master
commit 7dd4e0b72ebb9682f4042a044b4ba5bf494c996e
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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 9f4825ac14..5599d51906 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
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]