You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maccy dynamically adds/removes items in NSMenu to support searching across the items. In certain cases, this seems to completely break the NSMenu items list and its order. Here are exact steps to reproduce:
Start Maccy app.
Copy the following items to the system clipboard one by one: “one, two, three, four, five”.
Click Maccy icon in menubar and click “Preferences …”
In “Appearance” tab, set “Number of items” to 3. This will make only “five”, “four” and “three” visible in Maccy.
Close “Preferences…”.
Click Maccy icon in menubar.
Click search field and type “five”.
Expected: The menu includes “five”, then separator item followed by “Clear”, “Preferences…”, “About” and “Quit”.
Actual: The menu includes “five” and “three”, whilst “Quit” is missing. Pressing “Shift” on keyboard moves “Clear all” higher.
Whilst debugging, I can clearly see that printing NSMenu.items shows the proper list of items (“five” with its 2 alternate items and no “three”):
Description
Maccy dynamically adds/removes items in NSMenu to support searching across the items. In certain cases, this seems to completely break the NSMenu items list and its order. Here are exact steps to reproduce:
Expected: The menu includes “five”, then separator item followed by “Clear”, “Preferences…”, “About” and “Quit”.
Actual: The menu includes “five” and “three”, whilst “Quit” is missing. Pressing “Shift” on keyboard moves “Clear all” higher.
Whilst debugging, I can clearly see that printing NSMenu.items shows the proper list of items (“five” with its 2 alternate items and no “three”):
Maccy is an open source and the whole code for adding/removing items can be seen in https://github.com/p0deje/Maccy/blob/5f85851571ecb1e91e77e3ff603b187473bf9d00/Maccy/Menu.swift#L234-L270. It’s a lot of hard-to-read code, but it essentially boils down to adding/inserting/removing items in https://github.com/p0deje/Maccy/blob/5f85851571ecb1e91e77e3ff603b187473bf9d00/Maccy/Menu.swift#L546-L569.
Files
The text was updated successfully, but these errors were encountered: