5 Patch-ID: readline52-010
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
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.
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
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;
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))
43 + _rl_last_c_pos -= wrap_offset;