diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-03 14:22:20 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-03 14:22:20 +0200 |
commit | e2b60e73c28907369e79902733b189b7ac868ddd (patch) | |
tree | e9f82ebbae789075b0b7664e464065ee7aec274f /src | |
parent | b389da832f6b7408f60a352b734d51b8080b9a26 (diff) | |
download | weechat-e2b60e73c28907369e79902733b189b7ac868ddd.zip |
Do not write "--" or "++" indicators for bars with items where cursor is moved (like input_text)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/curses/gui-curses-bar.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/curses/gui-curses-bar.c b/src/gui/curses/gui-curses-bar.c index 7faef34f2..6f10b1590 100644 --- a/src/gui/curses/gui-curses-bar.c +++ b/src/gui/curses/gui-curses-bar.c @@ -1015,7 +1015,8 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, } } } - if ((bar_window->scroll_x > 0) || (bar_window->scroll_y > 0)) + if ((bar_window->cursor_x < 0) && (bar_window->cursor_y < 0) + && ((bar_window->scroll_x > 0) || (bar_window->scroll_y > 0))) { x = (bar_window->height > 1) ? bar_window->width - 2 : 0; if (x < 0) @@ -1026,7 +1027,8 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, CONFIG_INTEGER(bar_window->bar->color_bg)); mvwprintw (bar_window->win_bar, y, x, "--"); } - if (some_data_not_displayed || (line < items_count)) + if ((bar_window->cursor_x < 0) && (bar_window->cursor_y < 0) + && (some_data_not_displayed || (line < items_count))) { x = bar_window->width - 2; if (x < 0) @@ -1125,7 +1127,8 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, } } } - if ((bar_window->scroll_x > 0) || (bar_window->scroll_y > 0)) + if ((bar_window->cursor_x < 0) && (bar_window->cursor_y < 0) + && ((bar_window->scroll_x > 0) || (bar_window->scroll_y > 0))) { x = (bar_window->height > 1) ? bar_window->width - 2 : 0; if (x < 0) @@ -1136,7 +1139,8 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, CONFIG_INTEGER(bar_window->bar->color_bg)); mvwprintw (bar_window->win_bar, y, x, "--"); } - if (some_data_not_displayed || (line < items_count)) + if ((bar_window->cursor_x < 0) && (bar_window->cursor_y < 0) + && (some_data_not_displayed || (line < items_count))) { x = bar_window->width - 2; if (x < 0) |