diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/fe-channels.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c index 83638ddf..fe41ea30 100644 --- a/src/fe-common/core/fe-channels.c +++ b/src/fe-common/core/fe-channels.c @@ -349,7 +349,7 @@ static void display_sorted_nicks(CHANNEL_REC *channel, GSList *nicklist) g_free(format); if (settings_get_int("names_max_width") > 0 && - max_width > settings_get_int("names_max_width")) + settings_get_int("names_max_width") < max_width) max_width = settings_get_int("names_max_width"); /* remove width of the timestamp from max_width */ @@ -373,6 +373,12 @@ static void display_sorted_nicks(CHANNEL_REC *channel, GSList *nicklist) g_free(stripped); } + if (max_width <= 0) { + /* we should always have at least some space .. if we + really don't, it won't show properly anyway. */ + max_width = 10; + } + /* calculate columns */ cols = get_max_column_count(nicklist, get_nick_length, max_width, settings_get_int("names_max_columns"), |