bash30-006 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. *** bash-3.0/lib/readline/display.c Thu May 27 22:57:51 2004
  2. --- bash/lib/readline/display.c Mon Aug 30 11:55:02 2004
  3. ***************
  4. *** 202,206 ****
  5. {
  6. char *r, *ret, *p;
  7. ! int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
  8. /* Short-circuit if we can. */
  9. --- 202,206 ----
  10. {
  11. char *r, *ret, *p;
  12. ! int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
  13. /* Short-circuit if we can. */
  14. ***************
  15. *** 223,226 ****
  16. --- 223,227 ----
  17. invfl = 0; /* invisible chars in first line of prompt */
  18. + invflset = 0; /* we only want to set invfl once */
  19. for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
  20. ***************
  21. *** 250,254 ****
  22. *r++ = *p++;
  23. if (!ignoring)
  24. ! rl += ind - pind;
  25. else
  26. ninvis += ind - pind;
  27. --- 251,258 ----
  28. *r++ = *p++;
  29. if (!ignoring)
  30. ! {
  31. ! rl += ind - pind;
  32. ! physchars += _rl_col_width (pmt, pind, ind);
  33. ! }
  34. else
  35. ninvis += ind - pind;
  36. ***************
  37. *** 260,273 ****
  38. *r++ = *p;
  39. if (!ignoring)
  40. ! rl++; /* visible length byte counter */
  41. else
  42. ninvis++; /* invisible chars byte counter */
  43. }
  44. ! if (rl >= _rl_screenwidth)
  45. ! invfl = ninvis;
  46. !
  47. ! if (ignoring == 0)
  48. ! physchars++;
  49. }
  50. }
  51. --- 264,280 ----
  52. *r++ = *p;
  53. if (!ignoring)
  54. ! {
  55. ! rl++; /* visible length byte counter */
  56. ! physchars++;
  57. ! }
  58. else
  59. ninvis++; /* invisible chars byte counter */
  60. }
  61. ! if (invflset == 0 && rl >= _rl_screenwidth)
  62. ! {
  63. ! invfl = ninvis;
  64. ! invflset = 1;
  65. ! }
  66. }
  67. }
  68. ***************
  69. *** 418,422 ****
  70. register char *line;
  71. int c_pos, inv_botlin, lb_botlin, lb_linenum;
  72. ! int newlines, lpos, temp, modmark;
  73. char *prompt_this_line;
  74. #if defined (HANDLE_MULTIBYTE)
  75. --- 425,429 ----
  76. register char *line;
  77. int c_pos, inv_botlin, lb_botlin, lb_linenum;
  78. ! int newlines, lpos, temp, modmark, n0, num;
  79. char *prompt_this_line;
  80. #if defined (HANDLE_MULTIBYTE)
  81. ***************
  82. *** 574,577 ****
  83. --- 581,585 ----
  84. #if defined (HANDLE_MULTIBYTE)
  85. memset (_rl_wrapped_line, 0, vis_lbsize);
  86. + num = 0;
  87. #endif
  88. ***************
  89. *** 592,596 ****
  90. --- 600,619 ----
  91. prompts that exceed two physical lines?
  92. Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
  93. + #if defined (HANDLE_MULTIBYTE)
  94. + n0 = num;
  95. + temp = local_prompt ? strlen (local_prompt) : 0;
  96. + while (num < temp)
  97. + {
  98. + if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth)
  99. + {
  100. + num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
  101. + break;
  102. + }
  103. + num++;
  104. + }
  105. + temp = num +
  106. + #else
  107. temp = ((newlines + 1) * _rl_screenwidth) +
  108. + #endif /* !HANDLE_MULTIBYTE */
  109. ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
  110. : ((newlines == 1) ? wrap_offset : 0))
  111. ***************
  112. *** 598,602 ****
  113. --- 621,629 ----
  114. inv_lbreaks[++newlines] = temp;
  115. + #if defined (HANDLE_MULTIBYTE)
  116. + lpos -= _rl_col_width (local_prompt, n0, num);
  117. + #else
  118. lpos -= _rl_screenwidth;
  119. + #endif
  120. }
  121. *** bash-3.0/patchlevel.h Wed Aug 22 08:05:39 2001
  122. --- bash/patchlevel.h Thu Sep 2 15:04:32 2004
  123. ***************
  124. *** 26,30 ****
  125. looks for to find the patch level (for the sccs version string). */
  126. ! #define PATCHLEVEL 5
  127. #endif /* _PATCHLEVEL_H_ */
  128. --- 26,30 ----
  129. looks for to find the patch level (for the sccs version string). */
  130. ! #define PATCHLEVEL 6
  131. #endif /* _PATCHLEVEL_H_ */