mirror of
https://github.com/neovim/neovim.git
synced 2026-09-09 15:35:51 +00:00
Problem: `REMAP_NONE` is -1 and `REMAP_SCRIPT` is -2. These are enumerated values, not bit flags, so `&` is the wrong operator: `x & -1` is `x`, and `-1 & -2` is -2, which is truthy. Both kinds of non-remapping menu therefore reported `noremap` and `sid` as 1 and became indistinguishable. The sibling `menu_get_info()` already compares with `==`. Solution: Compare rather than mask. The expectations in menu_spec.lua had the conflated values baked in, so 22 entries from plain `*noremenu` commands now report `sid = 0`, and the two from `nnoremenu <script> Export.Script` now report `noremap = 0`. AI-assisted