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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/uzbl-core.c b/src/uzbl-core.c
index f90c5dd..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 */
@@ -962,9 +966,10 @@ initialize(int argc, char** argv) {
if (uzbl.state.socket_id || uzbl.state.embed)
uzbl.state.plug_mode = TRUE;
+#if !GLIB_CHECK_VERSION(2, 31, 0)
if (!g_thread_supported())
g_thread_init(NULL);
-
+#endif
/* TODO: move the handler setup to event_buffer_timeout and disarm the
* handler in empty_event_buffer? */