alternative fix for menu search (':')

This avoids clearing core context variables within a window port.
This commit is contained in:
nhmall
2023-11-17 08:37:54 -05:00
parent a49c872f47
commit 8d1001842d
6 changed files with 19 additions and 11 deletions

View File

@@ -3442,6 +3442,7 @@ extern void add_menu(winid, const glyph_info *, const ANY_P *,
char, char, int, int, const char *, unsigned int);
extern void add_menu_heading(winid, const char *);
extern void add_menu_str(winid, const char *);
extern void getlin(const char *, char *);
/* ### windows.c ### */

View File

@@ -763,6 +763,7 @@ struct sinfo {
int in_checkpoint; /* saving insurance checkpoint */
int in_parseoptions; /* in parseoptions */
int in_role_selection; /* role/race/&c selection menus in progress */
int in_getlin; /* inside interface getline routine */
int config_error_ready; /* config_error_add is ready, available */
int beyond_savefile_load; /* set when past savefile loading */
#ifdef PANICLOG

View File

@@ -149,7 +149,12 @@ extern
#define nh_poskey (*windowprocs.win_nh_poskey)
#define nhbell (*windowprocs.win_nhbell)
#define nh_doprev_message (*windowprocs.win_doprev_message)
#define getlin (*windowprocs.win_getlin)
/* 3.7: There is a real getlin() in the core now, which does
* some before and after activities.
* [alternative fix for menu search via ':'.]
* getlin() is in windows.c
*/
/* #define getlin (*windowprocs.win_getlin) */
#define get_ext_cmd (*windowprocs.win_get_ext_cmd)
#define number_pad (*windowprocs.win_number_pad)
#define nh_delay_output (*windowprocs.win_delay_output)