From e2b60e73c28907369e79902733b189b7ac868ddd Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 3 Oct 2008 14:22:20 +0200 Subject: Do not write "--" or "++" indicators for bars with items where cursor is moved (like input_text) --- src/gui/curses/gui-curses-bar.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') 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) -- cgit v1.2.3