]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/readline/readline52-008
readline-compat: update to 6.3
[ipfire-2.x.git] / src / patches / readline / readline52-008
CommitLineData
f19b3cb6
MT
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 5.2
5Patch-ID: readline52-008
6
7Bug-Reported-by: dAniel hAhler <ubuntu@thequod.de>
8Bug-Reference-ID: <4702ED8A.5000503@thequod.de>
9Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/119938
10
11Bug-Description:
12
13When updating the display after displaying, for instance, a list of possible
14completions, readline will place the cursor at the wrong position if the
15prompt contains invisible characters and a newline.
16
17Patch:
18
19*** ../readline-5.2-patched/display.c Mon Aug 6 14:26:29 2007
20--- display.c Wed Oct 10 22:43:58 2007
21***************
22*** 1049,1053 ****
23 else
24 tx = nleft;
25! if (_rl_last_c_pos > tx)
26 {
27 _rl_backspace (_rl_last_c_pos - tx); /* XXX */
28--- 1049,1053 ----
29 else
30 tx = nleft;
31! if (tx >= 0 && _rl_last_c_pos > tx)
32 {
33 _rl_backspace (_rl_last_c_pos - tx); /* XXX */
34***************
35*** 1205,1209 ****
36 {
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;
41--- 1205,1209 ----
42 {
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;
47***************
48*** 1466,1469 ****
49--- 1466,1471 ----
50 }
51
52+ o_cpos = _rl_last_c_pos;
53+
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
56***************
57*** 1475,1479 ****
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)
61 cpos_adjusted = 1;
62 #endif
63--- 1477,1483 ----
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)
69 cpos_adjusted = 1;
70 #endif