Actually make ee give feedback when exiting due to strange characters

This commit is contained in:
Pasi Kallinen 2014-05-22 22:12:14 +03:00
parent 5e54bb3b75
commit d704c69b90
1 changed files with 9 additions and 1 deletions

10
ee.c
View File

@ -1970,8 +1970,16 @@ int *append; /* TRUE if must append more text to end of current line */
wchar_t in_string[MAX_FILE];
length = mbstowcs(in_string, in_str, sizeof(in_string));
if (length == -1)
if (length == -1) {
wmove(com_win, 0, 0);
wprintw(com_win, "ERROR: Encountered a strange character. --more--");
wclrtoeol(com_win);
wrefresh(com_win);
(void) wget_wch(com_win, &in);
resetty();
endwin();
exit(0);
}
str2 = in_string;
num = 0;