mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 08:07:24 +04:00
- Accommodate macOS dynamic pipe sizing, avoiding hangs. - Modify the readline redisplay code to use a buffer offset instead of the physical prompt length in a multibyte locale to determine whether to reprint the prompt from column 0 because the cursor is before the last invisible character in the prompt string. - Fix readline crash with a prompt that exceeds 256 wrapped lines. Fix readline redisplay code to print the entire prompt if the first few characters are identical but part of a terminal escape sequence and the prompt needs to be redrawn. - Work around systems including bytes between 128 and 255 in the isalpha(3) set, which causes bash to potentially include them in identifier names. - 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. Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
From 9c465866b7d849378369ef700cbe2965aa9691e3 Mon Sep 17 00:00:00 2001
|
|
From: Chet Ramey <chet.ramey@case.edu>
|
|
Date: Tue, 15 Sep 2026 11:19:22 -0400
|
|
Subject: 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.
|
|
|
|
--- a/lib/readline/display.c
|
|
+++ b/lib/readline/display.c
|
|
@@ -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');
|
|
--- a/patchlevel.h
|
|
+++ b/patchlevel.h
|
|
@@ -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_ */
|