diff --git a/contrib/libreadline/readline.c b/contrib/libreadline/readline.c index 5e9767ab47f..5eaaf47435e 100644 --- a/contrib/libreadline/readline.c +++ b/contrib/libreadline/readline.c @@ -282,6 +282,7 @@ rl_set_prompt (prompt) { FREE (rl_prompt); rl_prompt = prompt ? savestring (prompt) : (char *)NULL; + rl_display_prompt = rl_prompt ? rl_prompt : ""; rl_visible_prompt_length = rl_expand_prompt (rl_prompt); return 0; @@ -714,7 +715,7 @@ _rl_dispatch_subseq (key, map, got_subseq) rl_dispatching = 1; RL_SETSTATE(RL_STATE_DISPATCHING); - r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); + (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); RL_UNSETSTATE(RL_STATE_DISPATCHING); rl_dispatching = 0; diff --git a/contrib/libreadline/text.c b/contrib/libreadline/text.c index 9053e96903b..bb87604aa6d 100644 --- a/contrib/libreadline/text.c +++ b/contrib/libreadline/text.c @@ -1071,8 +1071,6 @@ int rl_delete (count, key) int count, key; { - int r; - if (count < 0) return (_rl_rubout_char (-count, key)); @@ -1090,17 +1088,17 @@ rl_delete (count, key) else rl_forward_byte (count, key); - r = rl_kill_text (orig_point, rl_point); + rl_kill_text (orig_point, rl_point); rl_point = orig_point; - return r; } else { int new_point; new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); - return (rl_delete_text (rl_point, new_point)); + rl_delete_text (rl_point, new_point); } + return 0; } /* Delete the character under the cursor, unless the insertion