READLINE PATCH REPORT ===================== Readline-Release: 8.3 Patch-ID: readline83-005 Bug-Reported-by: Ben Kallus Derek Schrock Bug-Reference-ID: 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