← Commit list

f2de0b7ae

Paul Fox
Paul Fox
2005-09-13
SOURCE BUG Duration: 5s

Subject

allow either backspace or DEL, in addition to the user's erase char, to be used in get_input_line()

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+2 -1
@@ -2416,7 +2416,8 @@ static Byte *get_input_line(Byte * prompt) // get input line- use "status line"
c = get_one_char(); // read user input
if (c == '\n' || c == '\r' || c == 27)
break; // is this end of input
- if (c == erase_char) { // user wants to erase prev char
+ if (c == erase_char || c == 8 || c == 127) {
+ // user wants to erase prev char
i--; // backup to prev char
buf[i] = '\0'; // erase the char
buf[i + 1] = '\0'; // null terminate buffer