diff --git a/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp b/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp index 06e7a0a67..133743b6f 100644 --- a/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp +++ b/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp @@ -373,7 +373,7 @@ BOOL CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP nppParam->getAccelerator()->updateShortcuts(); // All menu items are shifted up. So we delete the last item - ::RemoveMenu(hMenu, posBase + nbElem - 1, MF_BYPOSITION); + ::RemoveMenu(hMenu, posBase + nbElem, MF_BYPOSITION); if (nbElem == 0) {