diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2004-06-17 18:48:01 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2004-06-17 18:48:01 +0000 |
commit | 095f29652994075962cdfc43265e84fb690e9421 (patch) | |
tree | 35bb7e0f233e0d7a7cc80a49b4184871d0814906 /src/gui/curses/gui-display.c | |
parent | 340176d635c8a9a2107fa4007e90e76f8ff39980 (diff) | |
download | weechat-095f29652994075962cdfc43265e84fb690e9421.zip |
Fixed display bug when nicklist is displayed at bottom of screen
Diffstat (limited to 'src/gui/curses/gui-display.c')
-rw-r--r-- | src/gui/curses/gui-display.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index 310493c3a..64ac7e8c3 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -227,10 +227,10 @@ gui_calculate_pos_size (t_gui_window *window) case CFG_LOOK_NICKLIST_TOP: nick_count (CHANNEL(window), &num_nicks, &num_op, &num_halfop, &num_voice, &num_normal); - if (((max_length + 1) * num_nicks) % COLS == 0) - lines = ((max_length + 1) * num_nicks) / COLS; + if (((max_length + 2) * num_nicks) % COLS == 0) + lines = ((max_length + 2) * num_nicks) / COLS; else - lines = (((max_length + 1) * num_nicks) / COLS) + 1; + lines = (((max_length + 2) * num_nicks) / COLS) + 1; window->win_chat_x = 0; window->win_chat_y = 1 + (lines + 1); window->win_chat_width = COLS; @@ -246,10 +246,10 @@ gui_calculate_pos_size (t_gui_window *window) case CFG_LOOK_NICKLIST_BOTTOM: nick_count (CHANNEL(window), &num_nicks, &num_op, &num_halfop, &num_voice, &num_normal); - if (((max_length + 1) * num_nicks) % COLS == 0) - lines = ((max_length + 1) * num_nicks) / COLS; + if (((max_length + 2) * num_nicks) % COLS == 0) + lines = ((max_length + 2) * num_nicks) / COLS; else - lines = (((max_length + 1) * num_nicks) / COLS) + 1; + lines = (((max_length + 2) * num_nicks) / COLS) + 1; window->win_chat_x = 0; window->win_chat_y = 1; window->win_chat_width = COLS; @@ -778,9 +778,9 @@ gui_draw_window_nick (t_gui_window *window) if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) || (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) { - if (y >= window->win_nick_height - 1) + if (y - ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0) >= window->win_nick_height - 1) { - column += max_length + 1; + column += max_length + 2; y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ? 0 : 1; } |