diff --git a/configure.ac b/configure.ac index ee768f4..a956c40 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([lbbs],[1.7.5]) +AC_INIT([lbbs],[1.7.6]) AC_CONFIG_SRCDIR([src/]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIRS([m4]) diff --git a/src/screen.c b/src/screen.c index 735fb66..bdf41f7 100644 --- a/src/screen.c +++ b/src/screen.c @@ -170,6 +170,12 @@ static int _str_input(char *buffer, int buf_size, int max_display_len, enum io_e { continue; } + else if (ch == KEY_ESC) + { + buffer[0] = '\0'; + offset = 0; + break; + } else if (ch == BACKSPACE || ch == KEY_DEL) { if (offset > 0) @@ -345,6 +351,12 @@ int get_data(int row, int col, char *prompt, char *buffer, int buf_size, int max { continue; } + else if (ch == KEY_ESC) + { + buffer[0] = '\0'; + len = 0; + break; + } else if (ch == BACKSPACE) { if (offset > 0) diff --git a/src/user_list_display.c b/src/user_list_display.c index ba6f6c8..6e4c38d 100644 --- a/src/user_list_display.c +++ b/src/user_list_display.c @@ -520,6 +520,7 @@ int user_list_search(void) moveto(3, 1); clrtoeol(); prints("用户名格式非法"); + press_any_key(); continue; }