1 *** ../bash-3.0/lib/readline/display.c Thu May 27 22:57:51 2004
2 --- lib/readline/display.c Mon Aug 30 11:55:02 2004
7 ! int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
9 /* Short-circuit if we can. */
13 ! int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
15 /* Short-circuit if we can. */
20 invfl = 0; /* invisible chars in first line of prompt */
21 + invflset = 0; /* we only want to set invfl once */
23 for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
36 ! physchars += _rl_col_width (pmt, pind, ind);
44 ! rl++; /* visible length byte counter */
46 ninvis++; /* invisible chars byte counter */
49 ! if (rl >= _rl_screenwidth)
60 ! rl++; /* visible length byte counter */
64 ninvis++; /* invisible chars byte counter */
67 ! if (invflset == 0 && rl >= _rl_screenwidth)
76 &prompt_last_invisible,
80 /* The portion of the prompt string up to and including the
82 &prompt_last_invisible,
84 ! &prompt_physical_chars);
86 /* The portion of the prompt string up to and including the
90 &prompt_invis_chars_first_line,
91 ! &prompt_physical_chars);
93 return (prompt_prefix_length);
96 &prompt_invis_chars_first_line,
99 return (prompt_prefix_length);
103 int c_pos, inv_botlin, lb_botlin, lb_linenum;
104 ! int newlines, lpos, temp, modmark;
105 char *prompt_this_line;
106 #if defined (HANDLE_MULTIBYTE)
109 int c_pos, inv_botlin, lb_botlin, lb_linenum;
110 ! int newlines, lpos, temp, modmark, n0, num;
111 char *prompt_this_line;
112 #if defined (HANDLE_MULTIBYTE)
116 #if defined (HANDLE_MULTIBYTE)
117 memset (_rl_wrapped_line, 0, vis_lbsize);
124 prompts that exceed two physical lines?
125 Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
126 + #if defined (HANDLE_MULTIBYTE)
128 + temp = local_prompt ? strlen (local_prompt) : 0;
131 + if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth)
133 + num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
140 temp = ((newlines + 1) * _rl_screenwidth) +
141 + #endif /* !HANDLE_MULTIBYTE */
142 ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
143 : ((newlines == 1) ? wrap_offset : 0))
148 inv_lbreaks[++newlines] = temp;
149 + #if defined (HANDLE_MULTIBYTE)
150 + lpos -= _rl_col_width (local_prompt, n0, num);
152 lpos -= _rl_screenwidth;