diff --git a/ChangeLog b/ChangeLog index 4ee83a4f3..52b3d6d3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.6-dev, 2011-07-30 +v0.3.6-dev, 2011-08-02 Version 0.3.6 (under dev!) -------------------------- +* core: stop horizontal bar scroll at the end of content (for bars with + horizontal filling) (bug #27908) * core: fix crash when building hashtable string with keys and values * core: add number in windows (add optional argument "-window" so some actions for command /window) diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c index ced409c64..aee425f12 100644 --- a/src/gui/curses/gui-curses-bar-window.c +++ b/src/gui/curses/gui-curses-bar-window.c @@ -435,6 +435,18 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, content = gui_bar_window_content_get_with_filling (bar_window, window); if (content) { + if ((filling == GUI_BAR_FILLING_HORIZONTAL) + && (bar_window->scroll_x > 0)) + { + length_on_screen = gui_chat_strlen_screen (content); + if (bar_window->scroll_x > length_on_screen - bar_window->width) + { + bar_window->scroll_x = length_on_screen - bar_window->width; + if (bar_window->scroll_x < 0) + bar_window->scroll_x = 0; + } + } + items = string_split (content, "\n", 0, 0, &items_count); if (items_count == 0) {