mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 03:40:16 +02:00
Assume width 1 for control characters in places where a non-negative width is
expected. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4535 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d3687d8a97
commit
5bcafebbd4
4 changed files with 7 additions and 7 deletions
|
|
@ -166,7 +166,7 @@ static int pos2scrpos(GUI_ENTRY_REC *entry, int pos)
|
|||
if (term_type == TERM_TYPE_BIG5)
|
||||
xpos += big5_width(*p);
|
||||
else if (entry->utf8)
|
||||
xpos += mk_wcwidth(*p);
|
||||
xpos += unichar_isprint(*p) ? mk_wcwidth(*p) : 1;
|
||||
else
|
||||
xpos++;
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ static int scrpos2pos(GUI_ENTRY_REC *entry, int pos)
|
|||
if (term_type == TERM_TYPE_BIG5)
|
||||
width = big5_width(*p);
|
||||
else if (entry->utf8)
|
||||
width = mk_wcwidth(*p);
|
||||
width = unichar_isprint(*p) ? mk_wcwidth(*p) : 1;
|
||||
else
|
||||
width = 1;
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos)
|
|||
else if (term_type == TERM_TYPE_BIG5)
|
||||
xpos += big5_width(*p);
|
||||
else if (entry->utf8)
|
||||
xpos += mk_wcwidth(*p);
|
||||
xpos += unichar_isprint(*p) ? mk_wcwidth(*p) : 1;
|
||||
else
|
||||
xpos++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue