mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
A bit more better utf8 support, still not a good input line.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2355 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
46b318b831
commit
2c3216d10c
4 changed files with 54 additions and 21 deletions
|
|
@ -396,17 +396,14 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
|
|||
}
|
||||
|
||||
if (xpos < term_width) {
|
||||
if ((*text & 127) >= 32) {
|
||||
if (view->utf8) {
|
||||
/* UTF8 - print multiple chars */
|
||||
const unsigned char *end = text;
|
||||
const unsigned char *end = text;
|
||||
if (view->utf8)
|
||||
get_utf8_char(&end);
|
||||
|
||||
get_utf8_char(&end);
|
||||
while (text < end) {
|
||||
term_addch(view->window, *text);
|
||||
text++;
|
||||
}
|
||||
}
|
||||
if (*text >= 32 &&
|
||||
(end != text || (*text & 127) >= 32)) {
|
||||
for (; text < end; text++)
|
||||
term_addch(view->window, *text);
|
||||
term_addch(view->window, *text);
|
||||
} else {
|
||||
/* low-ascii */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue