summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-05-25 11:11:23 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-05-25 11:11:23 +0000
commit487da4174504f797171f12a01636c54272ec6a62 (patch)
tree827b40e7ea06509e7a54661204e5bbf543e4d00f /src
parent665963703bb08b5a97d4ba2e5c3efbeb06f0ddb5 (diff)
downloadirssi-487da4174504f797171f12a01636c54272ec6a62.zip
now other than long nicks in NAMES list were displayed wrong. changed back
to old behaviour, but added a small kludge.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@229 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/irc/fe-events-numeric.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c
index 2d24529c..89e9b969 100644
--- a/src/fe-common/irc/fe-events-numeric.c
+++ b/src/fe-common/irc/fe-events-numeric.c
@@ -80,7 +80,8 @@ static void display_sorted_nicks(CHANNEL_REC *channel, GSList *nicklist, gint it
str = g_string_new(NULL);
cols = max > 65 ? 1 : (65 / (max+3)); /* "[] " */
- lines = items <= cols ? 1 : (items-(cols-1)) / cols;
+ lines = items <= cols ? 1 : items/cols + 1;
+ if (lines > items) lines = items;
last = NULL; linebuf = g_malloc(max+1); linebuf[max] = '\0';
for (line = 0, col = 0, skip = 1, tmp = nicklist; line < lines; last = rec, tmp = tmp->next)