From c80ae0034b37695952ed67c90adacacd7f52ac3d Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 4 Mar 2009 18:50:30 +0100 Subject: fix scroll_to_end() when scroll is higher than the document --- src/flpsed.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flpsed.cxx b/src/flpsed.cxx index deffd73..f568255 100644 --- a/src/flpsed.cxx +++ b/src/flpsed.cxx @@ -84,7 +84,8 @@ void scroll_to_begin() { void scroll_to_end() { assert(scroll && psed_p); - scroll->position(0, psed_p->h() - scroll->h()); + int new_pos = psed_p->h() > scroll->h() ? psed_p->h() - scroll->h() : 0; + scroll->position(0, new_pos); scroll->redraw(); } -- cgit v1.2.3