]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
This patch hopefully solves a bug that causes that when a tab (channel or private...
authorRodri <redacted>
Sat, 11 Feb 2017 15:44:50 +0000 (16:44 +0100)
committerTingPing <redacted>
Thu, 18 Jan 2018 20:07:14 +0000 (15:07 -0500)
This was previously submitted as an issue in: https://github.com/hexchat/hexchat/issues/1948
Maybe it isn't the ideal way to solve it, but at least I tested it and it seems to work.

src/fe-gtk/xtext.c

index 6151f5b67b752a973ba67623eb96659db585cd08..6691277e7eff008259ebe9c951856aca74fbec2f 100644 (file)
@@ -4964,6 +4964,14 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render)
        dontscroll (buf);       /* force scrolling off */
        xtext->adj->value = buf->old_value;
        xtext->adj->upper = buf->num_lines;
+
+       /* if the scrollbar was down, keep it down */
+       if (xtext->buffer->scrollbar_down && xtext->adj->value <
+               xtext->adj->upper - xtext->adj->page_size)
+       {
+               xtext->adj->value = xtext->adj->upper - xtext->adj->page_size;
+       }
+
        if (xtext->adj->upper == 0)
                xtext->adj->upper = 1;
        /* sanity check */