mudgangster

Log | Files | Refs

commit 851a2a0ec386dca4f1523d79f9ce98efa42b01aa
parent b146e8d50419daff397d16ddd9d01e633cb5e19f
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue,  4 Sep 2018 09:32:53 +0300

Don't scroll down on new text if you're already scrolled up

Diffstat:
src/textbox.cc | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/textbox.cc b/src/textbox.cc @@ -54,6 +54,8 @@ void textbox_add( TextBox * tb, const char * str, size_t len, Colour fg, Colour void textbox_newline( TextBox * tb ) { if( tb->num_lines < tb->max_lines ) { tb->num_lines++; + if( tb->scroll_offset > 0 ) + tb->scroll_offset++; return; }