ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.202 by root, Sat Mar 12 23:35:14 2005 UTC vs.
Revision 1.203 by root, Sat Jun 18 09:02:37 2005 UTC

163void 163void
164rxvt_term::iso14755_51 (unicode_t ch, rend_t r) 164rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
165{ 165{
166 rxvt_fontset *fs = FONTSET (r); 166 rxvt_fontset *fs = FONTSET (r);
167 rxvt_font *f = (*fs)[fs->find_font (ch)]; 167 rxvt_font *f = (*fs)[fs->find_font (ch)];
168 wchar_t *chr, *alloc, ch2; 168 wchar_t *chr, *alloc, ch2, *fname;
169 int len; 169 int len;
170
171 fname = rxvt_utf8towcs (f->name);
170 172
171#if ENABLE_COMBINING 173#if ENABLE_COMBINING
172 if (IS_COMPOSE (ch)) 174 if (IS_COMPOSE (ch))
173 { 175 {
174 len = rxvt_composite.expand (ch, 0); 176 len = rxvt_composite.expand (ch, 0);
183 alloc = 0; 185 alloc = 0;
184 chr = &ch2; 186 chr = &ch2;
185 len = 1; 187 len = 1;
186 } 188 }
187 189
188 int width = strlen (f->name); 190 int width = wcswidth (fname, wcslen (fname));
189 191
190 scr_overlay_new (0, -1, width < 8+5 ? 8+5 : width, len + 1); 192 scr_overlay_new (0, -1, width < 8+5 ? 8+5 : width, len + 1);
191 193
192 r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r)); 194 r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r));
193 195
206#endif 208#endif
207 scr_overlay_set (11, y, ch, r); 209 scr_overlay_set (11, y, ch, r);
208 scr_overlay_set (12, y, NOCHAR, r); 210 scr_overlay_set (12, y, NOCHAR, r);
209 } 211 }
210 212
211 scr_overlay_set (0, len, f->name); 213 scr_overlay_set (0, len, fname);
214
215 free (fname);
212 216
213#if ENABLE_COMBINING 217#if ENABLE_COMBINING
214 if (alloc) 218 if (alloc)
215 delete [] alloc; 219 delete [] alloc;
216#endif 220#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines