Merge pull request #291 from m-kress/master

added backspace to nTox; removed trailing spaces
This commit is contained in:
irungentoo 2013-08-03 05:02:28 -07:00
commit d2f2fd35b1

View File

@ -441,7 +441,7 @@ int main(int argc, char *argv[])
if (c == '\n') { if (c == '\n') {
line_eval(lines, line); line_eval(lines, line);
strcpy(line, ""); strcpy(line, "");
} else if (c == 127) { } else if (c == 8 || c == 127) {
line[strlen(line)-1] = '\0'; line[strlen(line)-1] = '\0';
} else if (isalnum(c) || ispunct(c) || c == ' ') { } else if (isalnum(c) || ispunct(c) || c == ' ') {
strcpy(line, appender(line, (char) c)); strcpy(line, appender(line, (char) c));