curses menu: support backspace/delete for counts

Have curses call the core get_count() routine instead rolling its
own so that backspace and delete are supported.  That part was
trivial to accomplish.  Unfortunately it brought the disappearing
menu phenomenon back so it became more complicated overall.
This commit is contained in:
PatR
2021-06-06 05:54:53 -07:00
parent 0280006d76
commit 41eecdf6b3
8 changed files with 48 additions and 33 deletions

View File

@@ -12,6 +12,8 @@ extern int orig_cursor; /* Preserve initial cursor state */
extern WINDOW *base_term; /* underlying terminal window */
extern boolean counting; /* Count window is active */
extern WINDOW *mapwin, *statuswin, *messagewin; /* Main windows */
extern WINDOW *activemenu; /* curses window for menu requesting a
* count; affects count_window refresh */
#define TEXTCOLOR /* Allow color */
#define NHW_END 19
@@ -160,7 +162,7 @@ extern void curses_prehousekeeping(void);
extern void curses_posthousekeeping(void);
extern void curses_view_file(const char *filename, boolean must_exist);
extern void curses_rtrim(char *str);
extern int curses_get_count(int first_digit);
extern long curses_get_count(int first_digit);
extern int curses_convert_attr(int attr);
extern int curses_read_attrs(const char *attrs);
extern char *curses_fmt_attrs(char *);