[packages/readline] - reverse upstream commit 8b464c6 (in 8.3 patchlevel 4) which breaks prompt string length calculatin
adwol
adwol at pld-linux.org
Mon Nov 30 02:36:09 CET 2026
commit e30e9183328165bcf562f27b0db66c15d1e54466
Author: Adam Osuchowski <>
Date: Mon Nov 30 02:34:46 2026 +0100
- reverse upstream commit 8b464c6 (in 8.3 patchlevel 4) which breaks prompt string length calculating and whole input line while using special characters in prompt (e.g. ANSI escape colour sequences)
- rel 2
readline-reverse-8b464c6.patch | 24 ++++++++++++++++++++++++
readline.spec | 4 +++-
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/readline.spec b/readline.spec
index d167ba7..84dc34d 100644
--- a/readline.spec
+++ b/readline.spec
@@ -16,7 +16,7 @@ Summary(tr.UTF-8): Terminalden satır okumak için kullanılan bir kitaplık
Summary(uk.UTF-8): Бібліотека для читання стрічок з терміналу
Name: readline
Version: %{ver}%{?patchlevel:.%{patchlevel}}
-Release: 1
+Release: 2
License: GPL v3+
Group: Libraries
Source0: https://ftp.gnu.org/gnu/readline/%{name}-%{ver}.tar.gz
@@ -26,6 +26,7 @@ Patch0: %{name}-shared.patch
Patch1: %{name}-info.patch
Patch2: %{name}-header.patch
Patch3: %{name}-termcap.patch
+Patch4: %{name}-reverse-8b464c6.patch
# Commits: http://git.savannah.gnu.org/cgit/readline.git/
%patchset_source -f https://ftp.gnu.org/gnu/readline/readline-8.3-patches/readline83-%03g -b %{min_patch_nr} 1 %{patchlevel}
URL: https://tiswww.cwru.edu/php/chet/readline/rltop.html
@@ -193,6 +194,7 @@ Bibliotecas estáticas para desenvolvimento com readline.
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
+%patch -P4 -p1
# force info regeneration
%{__rm} doc/*.info
diff --git a/readline-reverse-8b464c6.patch b/readline-reverse-8b464c6.patch
new file mode 100644
index 0000000..eec73cf
--- /dev/null
+++ b/readline-reverse-8b464c6.patch
@@ -0,0 +1,24 @@
+diff -ruNp readline-8.3.orig/display.c readline-8.3/display.c
+--- readline-8.3.orig/display.c 2026-11-30 02:16:23.127099956 +0100
++++ readline-8.3/display.c 2026-11-30 02:17:55.484975144 +0100
+@@ -1497,6 +1497,7 @@ rl_redisplay (void)
+ the characters from the current cursor position. But we
+ 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)
+ {
+@@ -1508,7 +1509,11 @@ rl_redisplay (void)
+ on the current screen line begins in the buffer. It is a
+ buffer position, an index into curline
+ (local_prompt + pmt_offset) */
+- cursor_bufpos = pmt_offset + local_prompt_len;
++ 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] &&
+ _rl_last_c_pos > 0 &&
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/readline.git/commitdiff/e30e9183328165bcf562f27b0db66c15d1e54466
More information about the pld-cvs-commit
mailing list