Some changes to make doublewidth chars possibly work (or possibly horribly

break whole utf8 support :)


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2956 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-10-14 18:33:29 +00:00 committed by cras
commit 2aaec5adc7
4 changed files with 120 additions and 17 deletions

View file

@ -104,7 +104,11 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos)
p = entry->scrstart + pos < entry->text_len ?
entry->text + entry->scrstart + pos : empty_str;
for (; *p != '\0' && xpos < end_xpos; p++, xpos++) {
for (; *p != '\0'; p++) {
xpos += utf8_width(*p);
if (xpos > end_xpos)
break;
if (entry->hidden)
term_addch(root_window, ' ');
else if (*p >= 32 && (entry->utf8 || (*p & 127) >= 32))