diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-02-14 10:59:27 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-02-14 10:59:27 +0000 |
commit | c536d1f19ccf869cab28a2d02e49cc5680f255da (patch) | |
tree | a98b5139765478459cf6ceab239fe3c052975f1c /src/fe-text/statusbar.c | |
parent | 6d11f6f897a17b92f3df1db35f6f6e21654ac130 (diff) | |
download | irssi-c536d1f19ccf869cab28a2d02e49cc5680f255da.zip |
Fix format_real_length to return the correct length when the input string
includes a trailing wide char.
Change statusbar_item_default_handler to compute padding also when
item->size < item->min_size, needed after the fix to format_real_length.
Patch by Yi-Hsuan Hsin, bug #452.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4416 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/statusbar.c')
-rw-r--r-- | src/fe-text/statusbar.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fe-text/statusbar.c b/src/fe-text/statusbar.c index 5eba9557..9f1b09b0 100644 --- a/src/fe-text/statusbar.c +++ b/src/fe-text/statusbar.c @@ -732,7 +732,7 @@ void statusbar_item_default_handler(SBAR_ITEM_REC *item, int get_size_only, /* they're forcing us smaller than minimum size.. */ len = format_real_length(tmpstr, item->size); tmpstr[len] = '\0'; - } else { + } /* make sure the str is big enough to fill the requested size, so it won't corrupt screen */ len = format_get_length(tmpstr); @@ -748,7 +748,6 @@ void statusbar_item_default_handler(SBAR_ITEM_REC *item, int get_size_only, g_free(tmpstr); tmpstr = tmpstr2; } - } tmpstr2 = update_statusbar_bg(tmpstr, item->bar->color); gui_printtext(item->xpos, item->bar->real_ypos, tmpstr2); |