Skip to content

Commit

Permalink
Add "none" as possible index value for menu's (but keep it undocument…
Browse files Browse the repository at this point in the history
…ed). See [fec9e3879d]
  • Loading branch information
jan.nijtmans committed Dec 26, 2023
2 parents 8ccfc03 + 8253b14 commit eeb1ac4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generic/tkMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,12 @@ GetMenuIndex(
*indexPtr = TCL_INDEX_NONE;
return TCL_OK;
}
#if !defined(TK_NO_DEPRECATED)
if ((string[0] == 'n') && (strcmp(string, "none") == 0)) {
*indexPtr = TCL_INDEX_NONE;
return TCL_OK;
}
#endif

if (string[0] == '@') {
if (GetIndexFromCoords(interp, menuPtr, string, indexPtr)
Expand Down

0 comments on commit eeb1ac4

Please sign in to comment.