Curses: fix extended command input
The extended command input prompt was behaving in an unintended way: Typing #a<enter> executed #adjust. Spaces in the entry prevented matching any command. No error message was given when no command was matched. Fix all of those, so it behaves more like the tty. Clean up the tty, curses, and X11 windowport code, so they don't use the extcmdlist array directly, but query with extcmds_match and extcmds_getentry.
This commit is contained in:
@@ -18,6 +18,12 @@
|
||||
#define PREFIXCMD 0x100 /* prefix command, requires another one after it */
|
||||
#define MOVEMENTCMD 0x200 /* used to move hero/cursor */
|
||||
|
||||
/* flags for extcmds_match() */
|
||||
#define ECM_NOFLAGS 0
|
||||
#define ECM_IGNOREAC 0x01 /* ignore !autocomplete commands */
|
||||
#define ECM_EXACTMATCH 0x02 /* needs exact match of findstr */
|
||||
#define ECM_NO1CHARCMD 0x04 /* ignore commands like '?' and '#' */
|
||||
|
||||
struct ext_func_tab {
|
||||
uchar key;
|
||||
const char *ef_txt, *ef_desc;
|
||||
|
||||
Reference in New Issue
Block a user