Added beep when user chooses an invalid selection (when selections are enabled)

modified:   src/nms.c
This commit is contained in:
Brian Barto 2016-04-20 18:33:51 -04:00
parent 53f3835195
commit 125cf82b42

View File

@ -233,8 +233,10 @@ char nms_exec(NmsArgs *args) {
if (isatty(STDIN_FILENO)) {
ret = getch();
if (args->return_opts != NULL && strlen(args->return_opts) > 0)
while (index(args->return_opts, ret) == NULL)
while (index(args->return_opts, ret) == NULL) {
beep();
ret = getch();
}
} else
sleep(2);