diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-25 03:41:03 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-25 03:41:03 +0100 |
commit | 4b89d512b1215e7b9d619af03496540d30cbbd1a (patch) | |
tree | 166830c57d912e78dfac591c4e47a5cd80cb886e /libbb | |
parent | 24860fa09cf954704232406055d7ca291c636eab (diff) | |
download | busybox-w32-4b89d512b1215e7b9d619af03496540d30cbbd1a.tar.gz busybox-w32-4b89d512b1215e7b9d619af03496540d30cbbd1a.tar.bz2 busybox-w32-4b89d512b1215e7b9d619af03496540d30cbbd1a.zip |
ash,hush: make ^C in interactive mode visually much closer to bash behavior
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index ac049f57d..4d7828cfa 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -2251,6 +2251,7 @@ static int32_t reverse_i_search(void) | |||
2251 | * Returns: | 2251 | * Returns: |
2252 | * -1 on read errors or EOF, or on bare Ctrl-D, | 2252 | * -1 on read errors or EOF, or on bare Ctrl-D, |
2253 | * 0 on ctrl-C (the line entered is still returned in 'command'), | 2253 | * 0 on ctrl-C (the line entered is still returned in 'command'), |
2254 | * (in both cases the cursor remains on the input line, '\n' is not printed) | ||
2254 | * >0 length of input string, including terminating '\n' | 2255 | * >0 length of input string, including terminating '\n' |
2255 | */ | 2256 | */ |
2256 | int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *command, int maxsize, int timeout) | 2257 | int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *command, int maxsize, int timeout) |
@@ -2686,7 +2687,6 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman | |||
2686 | && ic_raw == initial_settings.c_cc[VINTR] | 2687 | && ic_raw == initial_settings.c_cc[VINTR] |
2687 | ) { | 2688 | ) { |
2688 | /* Ctrl-C (usually) - stop gathering input */ | 2689 | /* Ctrl-C (usually) - stop gathering input */ |
2689 | goto_new_line(); | ||
2690 | command_len = 0; | 2690 | command_len = 0; |
2691 | break_out = -1; /* "do not append '\n'" */ | 2691 | break_out = -1; /* "do not append '\n'" */ |
2692 | break; | 2692 | break; |