Fix some #saveoptions issues
The #name default key was 'N', but that gets bound to #runsoutheast when not using number_pad. Swap around the default #name key to M-n, and bind the 'N' to it in commands_init instead. The number_pad option wasn't getting saved because it has a separate handler - mark the option as changed even if the value did not change so it will be saved to the config.
This commit is contained in:
@@ -2565,7 +2565,7 @@ struct ext_func_tab extcmdlist[] = {
|
|||||||
#endif
|
#endif
|
||||||
{ M('m'), "monster", "use monster's special ability",
|
{ M('m'), "monster", "use monster's special ability",
|
||||||
domonability, IFBURIED | AUTOCOMPLETE, NULL },
|
domonability, IFBURIED | AUTOCOMPLETE, NULL },
|
||||||
{ 'N', "name", "same as call; name a monster or object or object type",
|
{ M('n'), "name", "same as call; name a monster or object or object type",
|
||||||
docallcmd, IFBURIED | AUTOCOMPLETE, NULL },
|
docallcmd, IFBURIED | AUTOCOMPLETE, NULL },
|
||||||
{ M('o'), "offer", "offer a sacrifice to the gods",
|
{ M('o'), "offer", "offer a sacrifice to the gods",
|
||||||
dosacrifice, AUTOCOMPLETE | CMD_M_PREFIX, NULL },
|
dosacrifice, AUTOCOMPLETE | CMD_M_PREFIX, NULL },
|
||||||
@@ -3231,6 +3231,7 @@ commands_init(void)
|
|||||||
(void) bind_key('k', "kick");
|
(void) bind_key('k', "kick");
|
||||||
(void) bind_key('l', "loot");
|
(void) bind_key('l', "loot");
|
||||||
(void) bind_key(C('n'), "annotate");
|
(void) bind_key(C('n'), "annotate");
|
||||||
|
(void) bind_key('N', "name");
|
||||||
(void) bind_key('u', "untrap");
|
(void) bind_key('u', "untrap");
|
||||||
(void) bind_key('5', "run");
|
(void) bind_key('5', "run");
|
||||||
(void) bind_key(M('5'), "rush");
|
(void) bind_key(M('5'), "rush");
|
||||||
@@ -3239,7 +3240,6 @@ commands_init(void)
|
|||||||
/* alt keys: */
|
/* alt keys: */
|
||||||
(void) bind_key(M('O'), "overview");
|
(void) bind_key(M('O'), "overview");
|
||||||
(void) bind_key(M('2'), "twoweapon");
|
(void) bind_key(M('2'), "twoweapon");
|
||||||
(void) bind_key(M('n'), "name");
|
|
||||||
(void) bind_key(M('N'), "name");
|
(void) bind_key(M('N'), "name");
|
||||||
#if 0
|
#if 0
|
||||||
/* don't do this until the rest_on_space option is set or cleared */
|
/* don't do this until the rest_on_space option is set or cleared */
|
||||||
|
|||||||
@@ -8003,6 +8003,8 @@ doset_simple(void)
|
|||||||
reslt = (*allopt[k].optfn)(allopt[k].idx, do_handler,
|
reslt = (*allopt[k].optfn)(allopt[k].idx, do_handler,
|
||||||
FALSE, empty_optstr,
|
FALSE, empty_optstr,
|
||||||
empty_optstr);
|
empty_optstr);
|
||||||
|
if (reslt == optn_ok)
|
||||||
|
got_from_config[k] = TRUE;
|
||||||
} else {
|
} else {
|
||||||
char abuf[BUFSZ];
|
char abuf[BUFSZ];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user