diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-04 18:50:30 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-04 18:50:30 +0100 |
commit | c80ae0034b37695952ed67c90adacacd7f52ac3d (patch) | |
tree | 7aabe2ca790c64f6199c1cd93298319aef4d2e7a | |
parent | 45abad2c9ca6c51880f26d29652efdfdd9b12670 (diff) |
fix scroll_to_end() when scroll is higher than the document
-rw-r--r-- | src/flpsed.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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(); } |