From c82e88dd00d1b0b7fcfb4e5628d99611388cef6f Mon Sep 17 00:00:00 2001 From: rawnix ports Date: Sat, 26 Sep 2026 18:19:05 +0000 Subject: sync 2026-09-26 18:19 UTC 1672 files changed, 151396 insertions(+) --- core/readline/readline83-004 | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 core/readline/readline83-004 (limited to 'core/readline/readline83-004') diff --git a/core/readline/readline83-004 b/core/readline/readline83-004 new file mode 100644 index 0000000..f743af8 --- /dev/null +++ b/core/readline/readline83-004 @@ -0,0 +1,61 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.3 +Patch-ID: readline83-004 + +Bug-Reported-by: Lennart Ackermans +Bug-Reference-ID: +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 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 -- cgit v1.3.1