diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-02-06 23:25:17 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-02-06 23:25:17 +0000 |
commit | 7c48fc2fb30cf13ff5075c6d0ef78a38e07f8dd2 (patch) | |
tree | 1afaf6df53a989f45ec363c63041a338bec91a93 /src/fe-text | |
parent | 9d72e78ccd98ca60662c252fc9f89d0349eaf3a8 (diff) | |
download | irssi-7c48fc2fb30cf13ff5075c6d0ef78a38e07f8dd2.zip |
Amend check for non printable chars to filter control chars 80-9F in an utf8 locale, bug #460.
Note: this was and is still broken with koi8-r.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4413 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/gui-entry.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 7dcec358..63813af3 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -232,11 +232,11 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos) if (entry->hidden) term_addch(root_window, ' '); - else if (*p >= 32 && (entry->utf8 || (*p & 127) >= 32)) + else if (*p >= 32 && (*p < 0x7F || *p > 0x9F)) term_add_unichar(root_window, *p); else { term_set_color(root_window, ATTR_RESET|ATTR_REVERSE); - term_addch(root_window, *p+'A'-1); + term_addch(root_window, (*p & 127)+'A'-1); term_set_color(root_window, ATTR_RESET); } } |