Add macro support.
Replace WGETCH() with input_char(), which works the same except it supports an input buffer. Calling input_macro(s) sets the input buffer to 's'. The input buffer is returned by input_char() as if it had been typed by the user. If an error occurs (cmderr()), the input buffer is cleared.
This commit is contained in:
parent
44b2e4371e
commit
3440a87ea3
9 changed files with 159 additions and 49 deletions
4
ui.c
4
ui.c
|
|
@ -136,7 +136,7 @@ INT c;
|
|||
WADDSTR(pwin, WIDE(" [y/N]? "));
|
||||
wattroff(pwin, A_BOLD);
|
||||
|
||||
while (WGETCH(pwin, &c) == ERR
|
||||
while (input_char(&c) == ERR
|
||||
#ifdef KEY_RESIZE
|
||||
|| (c == KEY_RESIZE)
|
||||
#endif
|
||||
|
|
@ -190,7 +190,7 @@ histent_t *histpos = NULL;
|
|||
wmove(pwin, 0, STRLEN(msg) + 1 + pos);
|
||||
wrefresh(pwin);
|
||||
|
||||
if (WGETCH(pwin, &c) == ERR)
|
||||
if (input_char(&c) == ERR)
|
||||
continue;
|
||||
|
||||
switch (c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue