5 Patch-ID: readline52-004
7 Bug-Reported-by: Peter Volkov <torre_cremata@mail.ru>
8 Bug-Reference-ID: <1173636022.7039.36.camel@localhost>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00039.html
13 When restoring the original prompt after finishing an incremental search,
14 bash sometimes places the cursor incorrectly if the primary prompt contains
19 *** ../readline-5.2.3/display.c Fri Apr 20 13:30:16 2007
20 --- display.c Fri Apr 20 15:17:01 2007
25 _rl_output_some_chars (nfd, temp);
26 ! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);;
32 + /* If nfd begins at the prompt, or before the invisible
33 + characters in the prompt, we need to adjust _rl_last_c_pos
34 + in a multibyte locale to account for the wrap offset and
35 + set cpos_adjusted accordingly. */
36 _rl_output_some_chars (nfd, temp);
37 ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
39 ! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);
40 ! if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
42 ! _rl_last_c_pos -= wrap_offset;
47 ! _rl_last_c_pos += temp;
55 + /* If nfd begins at the prompt, or before the invisible
56 + characters in the prompt, we need to adjust _rl_last_c_pos
57 + in a multibyte locale to account for the wrap offset and
58 + set cpos_adjusted accordingly. */
59 _rl_output_some_chars (nfd, temp);
60 _rl_last_c_pos += col_temp; /* XXX */
61 + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
63 + if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
65 + _rl_last_c_pos -= wrap_offset;
70 lendiff = (oe - old) - (ne - new);