diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index d32046ca..ea62e6e9 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -2086,3 +2086,22 @@ array.h ---- lib/readline/terminal.c - rl_term_kP: fix typo. Fix from Koichi Murase + + 9/25 + ---- +lib/readline/display.c + - rl_clear_visible_line: call _rl_clear_to_eol with _rl_screenwidth as + the argument so we clear out the entire line even if the terminal + doesn't have a clear-to-eol sequence; make sure to add a call to + rl_cr after that so we know we're always in column 0 + - _rl_redisplay_after_sigwinch: just call rl_clear_visible_line instead + of erasing the last line of the display + - _rl_redisplay_after_sigwinch: if the prompt is longer than the screen + width, make sure to call _rl_reset_prompt to recalculate the + local_prompt_newlines array. Should fix issue from + https://savannah.gnu.org/support/index.php?110543 + +redir.c + - do_redirection_internal: if given [N]<&WORD- or [N]>&WORD- and WORD + expands to null, make it identical to <&- or >&- and close file + descriptor N (default 0). From a discussion back in 5/2021 diff --git a/config-top.h b/config-top.h index 9ba75d4d..03be53db 100644 --- a/config-top.h +++ b/config-top.h @@ -114,7 +114,7 @@ /* Define if you want the case-toggling operators (~[~]) and the `capcase' variable attribute (declare -c). */ -/* TAG: bash-5.2 disable */ +/* TAG: bash-5.2 disable? */ #define CASEMOD_TOGGLECASE #define CASEMOD_CAPCASE diff --git a/execute_cmd.c b/execute_cmd.c index fbb3900a..12ad25bd 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -367,7 +367,7 @@ executing_line_number () return currently_executing_command->value.ArithFor->line; #endif - return line_number; + return line_number; } else return line_number; diff --git a/lib/readline/display.c b/lib/readline/display.c index 29fb0181..5d34b49d 100644 --- a/lib/readline/display.c +++ b/lib/readline/display.c @@ -2588,7 +2588,8 @@ rl_clear_visible_line (void) for (curr_line = _rl_last_v_pos; curr_line >= 0; curr_line--) { _rl_move_vert (curr_line); - _rl_clear_to_eol (0); + _rl_clear_to_eol (_rl_screenwidth); + _rl_cr (); /* in case we use space_to_eol() */ } return 0; @@ -3372,27 +3373,16 @@ _rl_redisplay_after_sigwinch (void) screen line. */ if (_rl_term_cr) { - _rl_move_vert (_rl_vis_botlin); - - _rl_cr (); - _rl_last_c_pos = 0; - -#if !defined (__MSDOS__) - if (_rl_term_clreol) - tputs (_rl_term_clreol, 1, _rl_output_character_function); - else -#endif - { - space_to_eol (_rl_screenwidth); - _rl_cr (); - } - + rl_clear_visible_line (); if (_rl_last_v_pos > 0) _rl_move_vert (0); } else rl_crlf (); + if (_rl_screenwidth < prompt_visible_length) + _rl_reset_prompt (); /* update local_prompt_newlines array */ + /* Redraw only the last line of a multi-line prompt. */ t = strrchr (rl_display_prompt, '\n'); if (t) diff --git a/redir.c b/redir.c index febb826f..4b30941f 100644 --- a/redir.c +++ b/redir.c @@ -808,8 +808,6 @@ do_redirection_internal (redirect, flags, fnp) continue. */ redirectee_word = redirection_expand (redirectee); -#if 0 - /* TAG:bash-5.2 */ /* XXX - what to do with [N]<&$w- where w is unset or null? ksh93 turns it into [N]<&- or [N]>&- and closes N. */ if ((ri == r_move_input_word || ri == r_move_output_word) && redirectee_word == 0) @@ -818,9 +816,7 @@ do_redirection_internal (redirect, flags, fnp) rd.dest = 0; new_redirect = make_redirection (sd, r_close_this, rd, 0); } - else -#endif - if (redirectee_word == 0) + else if (redirectee_word == 0) return (AMBIGUOUS_REDIRECT); else if (redirectee_word[0] == '-' && redirectee_word[1] == '\0') {