Changeset 44972a7
- Timestamp:
- Dec 29, 2008, 8:06:35 PM (16 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 386216c
- Parents:
- 077f768
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/readline-5.2-fixes-5.patch
r077f768 r44972a7 1 1 Submitted By: Jim Gifford (jim at linuxfromscratch dot org) 2 Date: 12-2 1-20072 Date: 12-20-2008 3 3 Initial Package Version: 5.2 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 5.2-01 26 Description: Contains all upstream patches up to 5.2-013 7 7 8 8 diff -Naur readline-5.2.orig/complete.c readline-5.2/complete.c 9 --- readline-5.2.orig/complete.c 2006-07-28 11:35:49.000000000 -040010 +++ readline-5.2/complete.c 200 7-12-21 00:06:28.000000000 -05009 --- readline-5.2.orig/complete.c 2006-07-28 08:35:49.000000000 -0700 10 +++ readline-5.2/complete.c 2008-12-20 14:28:42.000000000 -0800 11 11 @@ -428,7 +428,7 @@ 12 12 return (1); … … 19 19 return (2); 20 20 diff -Naur readline-5.2.orig/display.c readline-5.2/display.c 21 --- readline-5.2.orig/display.c 2006-09-14 1 4:20:12.000000000 -040022 +++ readline-5.2/display.c 200 7-12-21 00:06:31.000000000 -050021 --- readline-5.2.orig/display.c 2006-09-14 11:20:12.000000000 -0700 22 +++ readline-5.2/display.c 2008-12-20 14:28:55.000000000 -0800 23 23 @@ -391,14 +391,14 @@ 24 24 t = ++p; … … 64 64 #if defined (HANDLE_MULTIBYTE) 65 65 #define CHECK_LPOS() \ 66 @@ -1036,7 +1048,7 @@ 66 @@ -898,6 +910,10 @@ 67 second and subsequent lines start at inv_lbreaks[N], offset by 68 OFFSET (which has already been calculated above). */ 69 70 +#define INVIS_FIRST() (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset) 71 +#define WRAP_OFFSET(line, offset) ((line == 0) \ 72 + ? (offset ? INVIS_FIRST() : 0) \ 73 + : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0)) 74 #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0) 75 #define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l])) 76 #define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l]) 77 @@ -932,7 +948,13 @@ 78 _rl_last_c_pos != o_cpos && 79 _rl_last_c_pos > wrap_offset && 80 o_cpos < prompt_last_invisible) 81 - _rl_last_c_pos -= wrap_offset; 82 + _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ 83 + else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth && 84 + (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && 85 + cpos_adjusted == 0 && 86 + _rl_last_c_pos != o_cpos && 87 + _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) 88 + _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line); 89 90 /* If this is the line with the prompt, we might need to 91 compensate for invisible characters in the new line. Do 92 @@ -1036,7 +1058,7 @@ 67 93 tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset; 68 94 else … … 73 99 _rl_backspace (_rl_last_c_pos - tx); /* XXX */ 74 100 _rl_last_c_pos = tx; 75 @@ -1192,7 +12 04,7 @@101 @@ -1192,7 +1214,7 @@ 76 102 int current_line, omax, nmax, inv_botlin; 77 103 { 78 104 register char *ofd, *ols, *oe, *nfd, *nls, *ne; 79 105 - int temp, lendiff, wsatend, od, nd; 80 + int temp, lendiff, wsatend, od, nd, o_cpos;106 + int temp, lendiff, wsatend, od, nd, twidth, o_cpos; 81 107 int current_invis_chars; 82 108 int col_lendiff, col_temp; 83 109 #if defined (HANDLE_MULTIBYTE) 84 @@ -1453,6 +1465,8 @@ 110 @@ -1208,7 +1230,7 @@ 111 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 112 temp = _rl_last_c_pos; 113 else 114 - temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); 115 + temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset); 116 if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode 117 && _rl_last_v_pos == current_line - 1) 118 { 119 @@ -1453,6 +1475,8 @@ 85 120 _rl_last_c_pos = lendiff; 86 121 } … … 91 126 cursor postion in multibyte mode, but a buffer index when not in a 92 127 multibyte locale. */ 93 @@ -1462,7 +14 76,9 @@128 @@ -1462,7 +1486,9 @@ 94 129 /* We need to indicate that the cursor position is correct in the presence of 95 130 invisible characters in the prompt string. Let's see if setting this when … … 102 137 #endif 103 138 #endif 104 @@ -1506,11 +15 22,31 @@139 @@ -1506,11 +1532,31 @@ 105 140 { 106 141 /* Non-zero if we're increasing the number of lines. */ … … 135 170 /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and 136 171 _rl_horizontal_scroll_mode == 1, inserting the characters with 137 @@ -1533,11 +15 69,16 @@172 @@ -1533,11 +1579,16 @@ 138 173 } 139 174 else … … 155 190 } 156 191 /* Copy (new) chars to screen from first diff to last match. */ 157 @@ -1586,8 +1627,22 @@ 192 @@ -1545,15 +1596,15 @@ 193 if ((temp - lendiff) > 0) 194 { 195 _rl_output_some_chars (nfd + lendiff, temp - lendiff); 196 -#if 1 197 /* XXX -- this bears closer inspection. Fixes a redisplay bug 198 reported against bash-3.0-alpha by Andreas Schwab involving 199 multibyte characters and prompt strings with invisible 200 characters, but was previously disabled. */ 201 - _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); 202 -#else 203 - _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff); 204 -#endif 205 + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 206 + twidth = _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); 207 + else 208 + twidth = temp - lendiff; 209 + _rl_last_c_pos += twidth; 210 } 211 } 212 else 213 @@ -1586,8 +1637,22 @@ 158 214 temp = nls - nfd; 159 215 if (temp > 0) … … 179 235 } 180 236 /* Otherwise, print over the existing material. */ 181 @@ -1595,8 +16 50,20 @@237 @@ -1595,8 +1660,20 @@ 182 238 { 183 239 if (temp > 0) … … 200 256 lendiff = (oe - old) - (ne - new); 201 257 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 202 @@ -1732,7 +1799,10 @@ 258 @@ -1721,7 +1798,7 @@ 259 int woff; /* number of invisible chars on current line */ 260 int cpos, dpos; /* current and desired cursor positions */ 261 262 - woff = W_OFFSET (_rl_last_v_pos, wrap_offset); 263 + woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); 264 cpos = _rl_last_c_pos; 265 #if defined (HANDLE_MULTIBYTE) 266 /* If we have multibyte characters, NEW is indexed by the buffer point in 267 @@ -1732,7 +1809,14 @@ 203 268 if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) 204 269 { … … 208 273 + prompt string, since they're both buffer indices and DPOS is a 209 274 + desired display position. */ 210 + if (new > prompt_last_invisible) /* XXX - don't use woff here */ 275 + if ((new > prompt_last_invisible) || /* XXX - don't use woff here */ 276 + (prompt_physical_chars > _rl_screenwidth && 277 + _rl_last_v_pos == prompt_last_screen_line && 278 + wrap_offset != woff && 279 + new > (prompt_last_invisible-_rl_screenwidth-wrap_offset))) 211 280 { 212 281 dpos -= woff; 213 282 /* Since this will be assigned to _rl_last_c_pos at the end (more 214 @@ -2380,6 +24 50,8 @@283 @@ -2380,6 +2464,8 @@ 215 284 216 285 if (end <= start) … … 222 291 223 292 diff -Naur readline-5.2.orig/input.c readline-5.2/input.c 224 --- readline-5.2.orig/input.c 2006-08-16 1 5:15:16.000000000 -0400225 +++ readline-5.2/input.c 200 7-12-21 00:06:32.000000000 -0500293 --- readline-5.2.orig/input.c 2006-08-16 12:15:16.000000000 -0700 294 +++ readline-5.2/input.c 2008-12-20 14:28:52.000000000 -0800 226 295 @@ -133,8 +133,11 @@ 227 296 return (0); … … 308 377 memset (&ps, 0, sizeof (mbstate_t)); 309 378 diff -Naur readline-5.2.orig/isearch.c readline-5.2/isearch.c 310 --- readline-5.2.orig/isearch.c 2005-12-26 1 7:18:53.000000000 -0500311 +++ readline-5.2/isearch.c 200 7-12-21 00:06:28.000000000 -0500379 --- readline-5.2.orig/isearch.c 2005-12-26 14:18:53.000000000 -0800 380 +++ readline-5.2/isearch.c 2008-12-20 14:28:42.000000000 -0800 312 381 @@ -327,8 +327,15 @@ 313 382 rl_command_func_t *f; … … 329 398 f = _rl_keymap[c].function; 330 399 diff -Naur readline-5.2.orig/misc.c readline-5.2/misc.c 331 --- readline-5.2.orig/misc.c 2005-12-26 1 7:20:46.000000000 -0500332 +++ readline-5.2/misc.c 200 7-12-21 00:06:28.000000000 -0500400 --- readline-5.2.orig/misc.c 2005-12-26 14:20:46.000000000 -0800 401 +++ readline-5.2/misc.c 2008-12-20 14:28:42.000000000 -0800 333 402 @@ -146,6 +146,8 @@ 334 403 rl_restore_prompt (); … … 341 410 } 342 411 diff -Naur readline-5.2.orig/readline.c readline-5.2/readline.c 343 --- readline-5.2.orig/readline.c 2006-08-16 1 5:00:36.000000000 -0400344 +++ readline-5.2/readline.c 200 7-12-21 00:06:28.000000000 -0500412 --- readline-5.2.orig/readline.c 2006-08-16 12:00:36.000000000 -0700 413 +++ readline-5.2/readline.c 2008-12-20 14:28:42.000000000 -0800 345 414 @@ -645,6 +645,11 @@ 346 415 if ((cxt->flags & KSEQ_DISPATCHED) == 0) … … 356 425 } 357 426 diff -Naur readline-5.2.orig/support/shobj-conf readline-5.2/support/shobj-conf 358 --- readline-5.2.orig/support/shobj-conf 2006-04-11 0 9:15:43.000000000 -0400359 +++ readline-5.2/support/shobj-conf 200 7-12-21 00:06:32.000000000 -0500427 --- readline-5.2.orig/support/shobj-conf 2006-04-11 06:15:43.000000000 -0700 428 +++ readline-5.2/support/shobj-conf 2008-12-20 14:28:53.000000000 -0800 360 429 @@ -10,7 +10,7 @@ 361 430 # Chet Ramey … … 449 518 SHLIB_LIBSUFF='sl' 450 519 diff -Naur readline-5.2.orig/text.c readline-5.2/text.c 451 --- readline-5.2.orig/text.c 2006-07-28 11:55:27.000000000 -0400452 +++ readline-5.2/text.c 200 7-12-21 00:06:28.000000000 -0500520 --- readline-5.2.orig/text.c 2006-07-28 08:55:27.000000000 -0700 521 +++ readline-5.2/text.c 2008-12-20 14:28:42.000000000 -0800 453 522 @@ -857,6 +857,9 @@ 454 523 c = rl_read_key (); … … 482 551 else 483 552 diff -Naur readline-5.2.orig/vi_mode.c readline-5.2/vi_mode.c 484 --- readline-5.2.orig/vi_mode.c 2006-07-29 1 6:42:28.000000000 -0400485 +++ readline-5.2/vi_mode.c 200 7-12-21 00:06:28.000000000 -0500553 --- readline-5.2.orig/vi_mode.c 2006-07-29 13:42:28.000000000 -0700 554 +++ readline-5.2/vi_mode.c 2008-12-20 14:28:42.000000000 -0800 486 555 @@ -886,6 +886,13 @@ 487 556 RL_SETSTATE(RL_STATE_MOREINPUT);
Note:
See TracChangeset
for help on using the changeset viewer.