summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-04 18:50:30 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-04 18:50:30 +0100
commitc80ae0034b37695952ed67c90adacacd7f52ac3d (patch)
tree7aabe2ca790c64f6199c1cd93298319aef4d2e7a /src
parent45abad2c9ca6c51880f26d29652efdfdd9b12670 (diff)
fix scroll_to_end() when scroll is higher than the document
Diffstat (limited to 'src')
-rw-r--r--src/flpsed.cxx3
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();
}