aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/uzbl-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uzbl-core.c')
-rw-r--r--src/uzbl-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/uzbl-core.c b/src/uzbl-core.c
index c3bc2dd..e70b5e7 100644
--- a/src/uzbl-core.c
+++ b/src/uzbl-core.c
@@ -331,11 +331,15 @@ scroll(GtkAdjustment* bar, gchar *amount_str) {
if (*end == '%')
value += page_size * amount * 0.01;
+ else if (*end == '!')
+ value = amount;
else
value += amount;
max_value = gtk_adjustment_get_upper(bar) - page_size;
+ if (value < 0)
+ value = 0; /* don't scroll past the beginning of the page */
if (value > max_value)
value = max_value; /* don't scroll past the end of the page */