|
Line 0
Link Here
|
|
|
1 |
*** readline-4.3/display.c Tue Jun 4 10:54:47 2002 |
| 2 |
--- display.c Fri Sep 13 16:22:57 2002 |
| 3 |
*************** |
| 4 |
*** 71,75 **** |
| 5 |
|
| 6 |
#if defined (HANDLE_MULTIBYTE) |
| 7 |
! static int _rl_col_width PARAMS((char *, int, int)); |
| 8 |
static int *_rl_wrapped_line; |
| 9 |
#else |
| 10 |
--- 71,75 ---- |
| 11 |
|
| 12 |
#if defined (HANDLE_MULTIBYTE) |
| 13 |
! static int _rl_col_width PARAMS((const char *, int, int)); |
| 14 |
static int *_rl_wrapped_line; |
| 15 |
#else |
| 16 |
*************** |
| 17 |
*** 1349,1355 **** |
| 18 |
_rl_output_some_chars (nfd + lendiff, temp - lendiff); |
| 19 |
#if 0 |
| 20 |
- _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff; |
| 21 |
- #else |
| 22 |
_rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); |
| 23 |
#endif |
| 24 |
} |
| 25 |
--- 1349,1355 ---- |
| 26 |
_rl_output_some_chars (nfd + lendiff, temp - lendiff); |
| 27 |
#if 0 |
| 28 |
_rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); |
| 29 |
+ #else |
| 30 |
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff); |
| 31 |
#endif |
| 32 |
} |
| 33 |
*************** |
| 34 |
*** 1511,1516 **** |
| 35 |
/* If we have multibyte characters, NEW is indexed by the buffer point in |
| 36 |
a multibyte string, but _rl_last_c_pos is the display position. In |
| 37 |
! this case, NEW's display position is not obvious. */ |
| 38 |
! if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return; |
| 39 |
#else |
| 40 |
if (_rl_last_c_pos == new) return; |
| 41 |
--- 1511,1523 ---- |
| 42 |
/* If we have multibyte characters, NEW is indexed by the buffer point in |
| 43 |
a multibyte string, but _rl_last_c_pos is the display position. In |
| 44 |
! this case, NEW's display position is not obvious and must be |
| 45 |
! calculated. */ |
| 46 |
! if (MB_CUR_MAX == 1 || rl_byte_oriented) |
| 47 |
! { |
| 48 |
! if (_rl_last_c_pos == new) |
| 49 |
! return; |
| 50 |
! } |
| 51 |
! else if (_rl_last_c_pos == _rl_col_width (data, 0, new)) |
| 52 |
! return; |
| 53 |
#else |
| 54 |
if (_rl_last_c_pos == new) return; |
| 55 |
*************** |
| 56 |
*** 1595,1603 **** |
| 57 |
{ |
| 58 |
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) |
| 59 |
! { |
| 60 |
! tputs (_rl_term_cr, 1, _rl_output_character_function); |
| 61 |
! for (i = 0; i < new; i++) |
| 62 |
! putc (data[i], rl_outstream); |
| 63 |
! } |
| 64 |
else |
| 65 |
_rl_backspace (_rl_last_c_pos - new); |
| 66 |
--- 1602,1606 ---- |
| 67 |
{ |
| 68 |
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) |
| 69 |
! _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new)); |
| 70 |
else |
| 71 |
_rl_backspace (_rl_last_c_pos - new); |
| 72 |
*************** |
| 73 |
*** 2118,2122 **** |
| 74 |
static int |
| 75 |
_rl_col_width (str, start, end) |
| 76 |
! char *str; |
| 77 |
int start, end; |
| 78 |
{ |
| 79 |
--- 2121,2125 ---- |
| 80 |
static int |
| 81 |
_rl_col_width (str, start, end) |
| 82 |
! const char *str; |
| 83 |
int start, end; |
| 84 |
{ |
| 85 |
*************** |
| 86 |
*** 2194,2196 **** |
| 87 |
} |
| 88 |
#endif /* HANDLE_MULTIBYTE */ |
| 89 |
- |
| 90 |
--- 2197,2198 ---- |