7 Bug-Reported-by: dAniel hAhler <ubuntu@thequod.de>
8 Bug-Reference-ID: <4702ED8A.5000503@thequod.de>
9 Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/119938
13 When updating the display after displaying, for instance, a list of possible
14 completions, readline will place the cursor at the wrong position if the
15 prompt contains invisible characters and a newline.
19 *** ../bash-3.2.25/lib/readline/display.c Mon Aug 6 14:26:29 2007
20 --- bash-3.2/lib/readline/display.c Wed Oct 10 22:43:58 2007
25 ! if (_rl_last_c_pos > tx)
27 _rl_backspace (_rl_last_c_pos - tx); /* XXX */
31 ! if (tx >= 0 && _rl_last_c_pos > tx)
33 _rl_backspace (_rl_last_c_pos - tx); /* XXX */
37 register char *ofd, *ols, *oe, *nfd, *nls, *ne;
38 ! int temp, lendiff, wsatend, od, nd;
39 int current_invis_chars;
40 int col_lendiff, col_temp;
43 register char *ofd, *ols, *oe, *nfd, *nls, *ne;
44 ! int temp, lendiff, wsatend, od, nd, o_cpos;
45 int current_invis_chars;
46 int col_lendiff, col_temp;
52 + o_cpos = _rl_last_c_pos;
54 /* When this function returns, _rl_last_c_pos is correct, and an absolute
55 cursor postion in multibyte mode, but a buffer index when not in a
58 invisible characters in the prompt string. Let's see if setting this when
59 we make sure we're at the end of the drawn prompt string works. */
60 ! if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_last_c_pos == prompt_physical_chars)
64 invisible characters in the prompt string. Let's see if setting this when
65 we make sure we're at the end of the drawn prompt string works. */
66 ! if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 &&
67 ! (_rl_last_c_pos > 0 || o_cpos > 0) &&
68 ! _rl_last_c_pos == prompt_physical_chars)
71 *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
72 --- bash-3.2/patchlevel.h Mon Oct 16 14:22:54 2006
75 looks for to find the patch level (for the sccs version string). */
77 ! #define PATCHLEVEL 26
79 #endif /* _PATCHLEVEL_H_ */
81 looks for to find the patch level (for the sccs version string). */
83 ! #define PATCHLEVEL 27
85 #endif /* _PATCHLEVEL_H_ */