pg83 commited on
Commit
25e4bd6
·
verified ·
1 Parent(s): e2e92af

Upload cas/1f/1f189c4566aa35950964647b9ec3be1a821e42b86048129c63eb7f9d4d2f5a74 with huggingface_hub

Browse files
cas/1f/1f189c4566aa35950964647b9ec3be1a821e42b86048129c63eb7f9d4d2f5a74 ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ READLINE PATCH REPORT
2
+ =====================
3
+
4
+ Readline-Release: 8.3
5
+ Patch-ID: readline83-004
6
+
7
+ Bug-Reported-by: Lennart Ackermans <lennart@ackermans.ch>
8
+ Bug-Reference-ID: <d6f36c30-633a-4e5e-8212-806db6441bf1@ackermans.ch>
9
+ Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-05/msg00066.html
10
+
11
+ Bug-Description:
12
+
13
+ If readline is invoked with the cursor somewhere other than column 0, and
14
+ the prompt contains multibyte characters, the display algorithm needs to
15
+ use a buffer offset, instead of the physical prompt length, to determine
16
+ whether or not to reprint the prompt from column 0 because the cursor is
17
+ before the last invisible character in the prompt string.
18
+
19
+ Patch (apply with `patch -p0'):
20
+
21
+ Lennart Ackermans <lennart@ackermans.ch> 5/19/2026
22
+
23
+ *** ../readline-8.3-patched/display.c Thu Sep 4 11:55:37 2025
24
+ --- display.c Fri May 22 14:55:01 2026
25
+ ***************
26
+ *** 1498,1502 ****
27
+ only need to reprint it if the cursor is before the last
28
+ invisible character in the prompt string. */
29
+ - /* XXX - why not use local_prompt_len? */
30
+ nleft = prompt_visible_length + wrap_offset;
31
+ if (cursor_linenum == prompt_last_screen_line)
32
+ --- 1498,1501 ----
33
+ ***************
34
+ *** 1510,1518 ****
35
+ buffer position, an index into curline
36
+ (local_prompt + pmt_offset) */
37
+ ! cursor_bufpos = pmt_offset;
38
+ ! if (mb_cur_max == 1 || rl_byte_oriented)
39
+ ! cursor_bufpos += _rl_last_c_pos;
40
+ ! else
41
+ ! cursor_bufpos += _rl_last_c_pos + curline_invchars;
42
+
43
+ if (local_prompt && local_prompt_invis_chars[cursor_linenum] &&
44
+ --- 1509,1513 ----
45
+ buffer position, an index into curline
46
+ (local_prompt + pmt_offset) */
47
+ ! cursor_bufpos = pmt_offset + local_prompt_len;
48
+
49
+ if (local_prompt && local_prompt_invis_chars[cursor_linenum] &&
50
+
51
+ *** ../readline-8.3/patchlevel 2013-11-15 08:11:11.000000000 -0500
52
+ --- patchlevel 2024-03-21 08:28:40.000000000 -0400
53
+ ***************
54
+ *** 1,3 ****
55
+ # Do not edit -- exists only for use by patch
56
+
57
+ ! 3
58
+ --- 1,3 ----
59
+ # Do not edit -- exists only for use by patch
60
+
61
+ ! 4