]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/readline/readline52-010
Merge remote-tracking branch 'stevee/axel-log-fix' into next
[ipfire-2.x.git] / src / patches / readline / readline52-010
1 READLINE PATCH REPORT
2 =====================
3
4 Readline-Release: 5.2
5 Patch-ID: readline52-010
6
7 Bug-Reported-by: Miroslav Lichvar <mlichvar@redhat.com>
8 Bug-Reference-ID: Fri, 02 Nov 2007 14:07:45 +0100
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-11/msg00000.html
10
11 Bug-Description:
12
13 In certain cases when outputting characters at the end of the line,
14 e.g., when displaying the prompt string, readline positions the cursor
15 incorrectly if the prompt string contains invisible characters and the
16 text being drawn begins before the last invisible character in the line.
17
18 Patch:
19
20 *** ../readline-5.2-patched/display.c 2007-08-25 13:47:08.000000000 -0400
21 --- display.c 2007-11-10 17:51:29.000000000 -0500
22 ***************
23 *** 1566,1574 ****
24 else
25 {
26 - /* We have horizontal scrolling and we are not inserting at
27 - the end. We have invisible characters in this line. This
28 - is a dumb update. */
29 _rl_output_some_chars (nfd, temp);
30 _rl_last_c_pos += col_temp;
31 return;
32 }
33 --- 1619,1632 ----
34 else
35 {
36 _rl_output_some_chars (nfd, temp);
37 _rl_last_c_pos += col_temp;
38 + /* If nfd begins before any invisible characters in the prompt,
39 + adjust _rl_last_c_pos to account for wrap_offset and set
40 + cpos_adjusted to let the caller know. */
41 + if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
42 + {
43 + _rl_last_c_pos -= wrap_offset;
44 + cpos_adjusted = 1;
45 + }
46 return;
47 }