Bash-5.3 patch 20: If readline handles a SIGWINCH and updates its idea of the screen dimensions, it needs to recompute the columns where the prompt wraps lines every time, not just when the screen width decreases.

This commit is contained in:
Chet Ramey
2026-09-15 11:19:22 -04:00
parent 549639c902
commit 9c465866b7
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -3522,8 +3522,9 @@ _rl_redisplay_after_sigwinch (void)
else
rl_crlf ();
if (_rl_screenwidth < prompt_visible_length)
_rl_reset_prompt (); /* update local_prompt_newlines array */
/* Let expand_prompt() update local_prompt_newlines and local_prompt_invis_chars
arrays */
_rl_reset_prompt ();
/* Redraw only the last line of a multi-line prompt. */
t = strrchr (rl_display_prompt, '\n');
+1 -1
View File
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
#define PATCHLEVEL 19
#define PATCHLEVEL 20
#endif /* _PATCHLEVEL_H_ */