aboutsummaryrefslogtreecommitdiff
path: root/src/uicmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r--src/uicmd.cc28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc
index 8b5157f1..30ae1f28 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -482,7 +482,7 @@ void a_UIcmd_bugmeter_popup(void *vbw)
{
BrowserWindow *bw = (BrowserWindow*)vbw;
- a_Menu_bugmeter_popup(bw, a_History_get_url(NAV_TOP(bw)));
+ a_Menu_bugmeter_popup(bw, a_History_get_url(NAV_TOP_UIDX(bw)));
}
/*
@@ -503,7 +503,7 @@ int *a_UIcmd_get_history(BrowserWindow *bw, int direction)
// Fill the list
i = a_Nav_stack_ptr(bw) + direction;
for (j = 0 ; i >= 0 && i < a_Nav_stack_size(bw); i+=direction, j += 1) {
- hlist[j] = NAV_IDX(bw,i);
+ hlist[j] = NAV_UIDX(bw,i);
}
hlist[j] = -1;
@@ -546,6 +546,30 @@ void a_UIcmd_get_scroll_xy(BrowserWindow *bw, int *x, int *y)
}
/*
+ * Set the scroll position ({x, y} offset pair)
+ */
+void a_UIcmd_set_scroll_xy(BrowserWindow *bw, int x, int y)
+{
+ Layout *layout = (Layout*)bw->render_layout;
+
+ if (layout) {
+ layout->scrollTo(HPOS_LEFT, VPOS_TOP, x, y, 0, 0);
+ }
+}
+
+/*
+ * Set the scroll position by fragment (from URL)
+ */
+void a_UIcmd_set_scroll_by_fragment(BrowserWindow *bw, const char *f)
+{
+ Layout *layout = (Layout*)bw->render_layout;
+
+ if (layout && f) {
+ layout->setAnchor(f);
+ }
+}
+
+/*
* Get location's text
*/
char *a_UIcmd_get_location_text(BrowserWindow *bw)