diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-05-09 11:13:41 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-05-09 11:13:41 +0000 |
commit | 880e10b6d6ba195181f27240fc955fa358cd37bc (patch) | |
tree | 07ae1e68405cc109df9000216a48e23674a87d05 /src/gui/curses/gui-curses-input.c | |
parent | 054abdff85366cb7e19d3196e60df69daf942dcf (diff) | |
download | weechat-880e10b6d6ba195181f27240fc955fa358cd37bc.zip |
Fixed nick display in input window
Diffstat (limited to 'src/gui/curses/gui-curses-input.c')
-rw-r--r-- | src/gui/curses/gui-curses-input.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/curses/gui-curses-input.c b/src/gui/curses/gui-curses-input.c index c7fd79734..e77681df6 100644 --- a/src/gui/curses/gui-curses-input.c +++ b/src/gui/curses/gui-curses-input.c @@ -96,7 +96,7 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick) pos++; switch (pos[0]) { - case 'c': + case 'c': /* channel or server name */ if (CHANNEL(window->buffer)) length += utf8_width_screen (CHANNEL(window->buffer)->name); else @@ -106,8 +106,8 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick) } pos++; break; - case 'm': - if (SERVER(window->buffer)) + case 'm': /* nick modes */ + if (SERVER(window->buffer) && SERVER(window->buffer)->is_connected) { if (SERVER(window->buffer)->nick_modes && SERVER(window->buffer)->nick_modes[0]) @@ -115,7 +115,7 @@ gui_input_get_prompt_length (t_gui_window *window, char *nick) } pos++; break; - case 'n': + case 'n': /* nick */ length += utf8_width_screen (nick); pos++; break; @@ -180,7 +180,7 @@ gui_input_draw_prompt (t_gui_window *window, char *nick) pos++; switch (pos[0]) { - case 'c': + case 'c': /* channel or server name */ if (CHANNEL(window->buffer)) { gui_window_set_weechat_color (GUI_CURSES(window)->win_input, @@ -208,8 +208,8 @@ gui_input_draw_prompt (t_gui_window *window, char *nick) } pos++; break; - case 'm': - if (SERVER(window->buffer)) + case 'm': /* nick modes */ + if (SERVER(window->buffer) && SERVER(window->buffer)->is_connected) { if (SERVER(window->buffer)->nick_modes && SERVER(window->buffer)->nick_modes[0]) @@ -222,7 +222,7 @@ gui_input_draw_prompt (t_gui_window *window, char *nick) } pos++; break; - case 'n': + case 'n': /* nick */ gui_window_set_weechat_color (GUI_CURSES(window)->win_input, COLOR_WIN_INPUT_NICK); buf = weechat_iconv_from_internal (NULL, nick); @@ -367,9 +367,9 @@ gui_input_draw (t_gui_buffer *buffer, int erase) if (buffer->input_buffer_length == 0) buffer->input_buffer[0] = '\0'; - if (SERVER(buffer)) + if (SERVER(buffer) && SERVER(buffer)->is_connected) ptr_nickname = (SERVER(buffer)->nick) ? - SERVER(buffer)->nick : SERVER(buffer)->nick1; + SERVER(buffer)->nick : cfg_look_no_nickname; else ptr_nickname = cfg_look_no_nickname; |