preserve traps across a failed exec; small changes to how completion options interact; fix a bug with arithmetic for commands and LINENO

This commit is contained in:
Chet Ramey
2021-10-11 10:38:16 -04:00
parent f74291e6d1
commit 304b1e938c
15 changed files with 228 additions and 16 deletions
+3 -2
View File
@@ -835,7 +835,8 @@ fnprint (const char *to_print, int prefix_bytes, const char *real_pathname)
colored_stat_start (real_pathname);
#endif
if (prefix_bytes && _rl_completion_prefix_display_length > 0)
if (prefix_bytes && _rl_completion_prefix_display_length > 0 &&
prefix_bytes > _rl_completion_prefix_display_length)
{
char ellipsis;
@@ -1548,7 +1549,7 @@ rl_display_match_list (char **matches, int len, int max)
if (common_length > _rl_completion_prefix_display_length && common_length > ELLIPSIS_LEN)
max -= common_length - ELLIPSIS_LEN;
else
else if (_rl_colored_completion_prefix <= 0)
common_length = sind = 0;
}
#if defined (COLOR_SUPPORT)
+5 -1
View File
@@ -386,8 +386,12 @@ _rl_sigwinch_resize_terminal (void)
void
rl_resize_terminal (void)
{
int width, height;
width = _rl_screenwidth;
height = _rl_screenheight;
_rl_get_screen_size (fileno (rl_instream), 1);
if (_rl_echoing_p)
if (_rl_echoing_p && (width != _rl_screenwidth || height != _rl_screenheight))
{
if (CUSTOM_REDISPLAY_FUNC ())
rl_forced_update_display ();