mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
core: stop horizontal bar scroll at the end of content (for bars with horizontal filling) (bug #27908)
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user