readline: Update to version 8.3 Patch-6
Commit Message
- Update from version 8.3 Patch-3 to 8.3 Patch-6
- No change in rootfile
- Changelog
Patch-6
If readline handles a SIGWINCH and resizes 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.
Patch-5
This patch fixes two problems with the redisplay code. The first is a
crash that results if the initial prompt contains more than 256 wrapped
lines. The second is a fix to the redisplay code when the first several
characters of the prompt string are identical, but the prompt has changed
and needs to be redrawn. If these first few characters are part of an escape
sequence, the entire sequence needs to be redrawn.
Patch-4
If readline is invoked with the cursor somewhere other than column 0, and
the prompt contains multibyte characters, the display algorithm needs to
use a buffer offset, instead of the physical prompt length, to determine
whether or not to reprint the prompt from column 0 because the cursor is
before the last invisible character in the prompt string.
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
lfs/readline | 4 +-
src/patches/readline/readline83-004 | 61 ++++++++++++++++++++++++++
src/patches/readline/readline83-005 | 67 +++++++++++++++++++++++++++++
src/patches/readline/readline83-006 | 47 ++++++++++++++++++++
4 files changed, 177 insertions(+), 2 deletions(-)
create mode 100644 src/patches/readline/readline83-004
create mode 100644 src/patches/readline/readline83-005
create mode 100644 src/patches/readline/readline83-006
@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2025 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2026 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -25,7 +25,7 @@
include Config
VER = 8.3
-PATCHVER = 3
+PATCHVER = 6
# https://ftp.gnu.org/gnu/readline/
THISAPP = readline-$(VER)
new file mode 100644
@@ -0,0 +1,61 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 8.3
+Patch-ID: readline83-004
+
+Bug-Reported-by: Lennart Ackermans <lennart@ackermans.ch>
+Bug-Reference-ID: <d6f36c30-633a-4e5e-8212-806db6441bf1@ackermans.ch>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-05/msg00066.html
+
+Bug-Description:
+
+If readline is invoked with the cursor somewhere other than column 0, and
+the prompt contains multibyte characters, the display algorithm needs to
+use a buffer offset, instead of the physical prompt length, to determine
+whether or not to reprint the prompt from column 0 because the cursor is
+before the last invisible character in the prompt string.
+
+Patch (apply with `patch -p0'):
+
+Lennart Ackermans <lennart@ackermans.ch> 5/19/2026
+
+*** ../readline-8.3-patched/display.c Thu Sep 4 11:55:37 2025
+--- display.c Fri May 22 14:55:01 2026
+***************
+*** 1498,1502 ****
+ only need to reprint it if the cursor is before the last
+ invisible character in the prompt string. */
+- /* XXX - why not use local_prompt_len? */
+ nleft = prompt_visible_length + wrap_offset;
+ if (cursor_linenum == prompt_last_screen_line)
+--- 1498,1501 ----
+***************
+*** 1510,1518 ****
+ buffer position, an index into curline
+ (local_prompt + pmt_offset) */
+! cursor_bufpos = pmt_offset;
+! if (mb_cur_max == 1 || rl_byte_oriented)
+! cursor_bufpos += _rl_last_c_pos;
+! else
+! cursor_bufpos += _rl_last_c_pos + curline_invchars;
+
+ if (local_prompt && local_prompt_invis_chars[cursor_linenum] &&
+--- 1509,1513 ----
+ buffer position, an index into curline
+ (local_prompt + pmt_offset) */
+! cursor_bufpos = pmt_offset + local_prompt_len;
+
+ if (local_prompt && local_prompt_invis_chars[cursor_linenum] &&
+
+*** ../readline-8.3/patchlevel 2013-11-15 08:11:11.000000000 -0500
+--- patchlevel 2024-03-21 08:28:40.000000000 -0400
+***************
+*** 1,3 ****
+ # Do not edit -- exists only for use by patch
+
+! 3
+--- 1,3 ----
+ # Do not edit -- exists only for use by patch
+
+! 4
new file mode 100644
@@ -0,0 +1,67 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 8.3
+Patch-ID: readline83-005
+
+Bug-Reported-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
+ Derek Schrock <dereks@lifeofadishwasher.com>
+Bug-Reference-ID: <CAB6pCSaUPimkEbQwTTkxD5vV14ZJRGCeK2W1ur8RqT1rPrd+Gw@mail.gmail.com>
+ <ajC1pZAV_95J3vsJ@ircbsd.lifeofadishwasher.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2026-06/msg00005.html
+ https://lists.gnu.org/archive/html/bug-readline/2026-06/msg00002.html
+
+Bug-Description:
+
+This patch fixes two problems with the redisplay code. The first is a
+crash that results if the initial prompt contains more than 256 wrapped
+lines. The second is a fix to the redisplay code when the first several
+characters of the prompt string are identical, but the prompt has changed
+and needs to be redrawn. If these first few characters are part of an escape
+sequence, the entire sequence needs to be redrawn.
+
+Patch (apply with `patch -p0'):
+
+*** ../readline-8.3-patched/display.c Fri May 22 14:55:01 2026
+--- display.c Fri Jun 26 11:08:53 2026
+***************
+*** 1025,1028 ****
+--- 1025,1029 ----
+ {
+ temp = local_prompt_newlines[newlines+1];
++ CHECK_INV_LBREAKS ();
+ inv_lbreaks[++newlines] = temp;
+ }
+***************
+*** 2262,2270 ****
+ nd = nfd - new; /* nd, od are buffer indexes */
+ if (current_line == 0 && !_rl_horizontal_scroll_mode &&
+! _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 &&
+ (((od > 0 || nd > 0) && (od <= prompt_last_invisible || nd <= prompt_last_invisible)) ||
+ ((od >= lendiff) && _rl_last_c_pos < PROMPT_ENDING_INDEX)))
+ {
+! _rl_cr ();
+ if (modmark)
+ _rl_output_some_chars ("*", 1);
+--- 2266,2275 ----
+ nd = nfd - new; /* nd, od are buffer indexes */
+ if (current_line == 0 && !_rl_horizontal_scroll_mode &&
+! _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos >= 0 &&
+ (((od > 0 || nd > 0) && (od <= prompt_last_invisible || nd <= prompt_last_invisible)) ||
+ ((od >= lendiff) && _rl_last_c_pos < PROMPT_ENDING_INDEX)))
+ {
+! if (_rl_last_c_pos > 0)
+! _rl_cr ();
+ if (modmark)
+ _rl_output_some_chars ("*", 1);
+*** ../readline-8.3/patchlevel 2013-11-15 08:11:11.000000000 -0500
+--- patchlevel 2024-03-21 08:28:40.000000000 -0400
+***************
+*** 1,3 ****
+ # Do not edit -- exists only for use by patch
+
+! 4
+--- 1,3 ----
+ # Do not edit -- exists only for use by patch
+
+! 5
new file mode 100644
@@ -0,0 +1,47 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 8.3
+Patch-ID: readline83-006
+
+Bug-Reported-by: Félix Bouynot <felix.bouynot@setenforce.one>
+Bug-Reference-ID: <39c9472ddcf23881693380c4b895dd3799b45cec.camel@setenforce.one>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-05/msg00065.html
+
+Bug-Description:
+
+If readline handles a SIGWINCH and resizes 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.
+
+Patch (apply with `patch -p0'):
+
+*** ../readline-8.3-patched/display.c Thu Sep 4 11:55:37 2025
+--- display.c Fri May 22 14:55:01 2026
+***************
+*** 3526,3531 ****
+ 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. */
+--- 3521,3527 ----
+ rl_crlf ();
+
+! /* 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. */
+*** ../readline-8.3/patchlevel 2013-11-15 08:11:11.000000000 -0500
+--- patchlevel 2024-03-21 08:28:40.000000000 -0400
+***************
+*** 1,3 ****
+ # Do not edit -- exists only for use by patch
+
+! 5
+--- 1,3 ----
+ # Do not edit -- exists only for use by patch
+
+! 6