.\" groff -man -Tascii vimb.1
.TH vimb 1 "DATE" "vimb/VERSION" "Vimb Manual"
.SH NAME
-vimb - Vim Browser - A modal web browser based on webkit thats inspired by
-vim the great editor.
+vimb - Vim Browser - A modal web browser based on webkit, inspired by vim the
+great editor.
.SH SYNOPSIS
.BI "vimb [" "OPTION" "] [" "URI" "]"
.SH DESCRIPTION
.TP
.BI '\-{ a-z }
Jump to the mark {\fIa-z\fP} on current page.
+.TP
+.B '\-'
+Jumps to the position before the latest jump, or where the last "m'" command
+was given.
.SS Hinting
The hinting is the way to do what you would do with the mouse in common
mouse-driven browsers. Open URI, yank URI, save page and so on. If the hinting
#define VB_WIDGET_SET_STATE(w, s) (gtk_widget_set_state(w, s))
#endif
-#define VB_MARK_CHARS "abcdefghijklmnopqrstuvwxyz"
+/* the special mark ' must be the first in the list for easiest lookup */
+#define VB_MARK_CHARS "'abcdefghijklmnopqrstuvwxyz"
+#define VB_MARK_TICK 0
#define VB_MARK_SIZE (sizeof(VB_MARK_CHARS) - 1)
/* enums */
static VbResult normal_mark(const NormalCmdInfo *info)
{
+ gdouble current;
char *mark;
int idx;
+
/* check if the second char is a valid mark char */
if (!(mark = strchr(VB_MARK_CHARS, info->key2))) {
return RESULT_ERROR;
if ((int)(vb.state.marks[idx] - .5) < 0) {
return RESULT_ERROR;
}
+
+ current = gtk_adjustment_get_value(vb.gui.adjust_v);
+
+ /* jump to the location */
gtk_adjustment_set_value(vb.gui.adjust_v, vb.state.marks[idx]);
+
+ /* save previous adjust as last position */
+ vb.state.marks[VB_MARK_TICK] = current;
}
return RESULT_COMPLETE;
}
adjust = vb.gui.adjust_v;
max = gtk_adjustment_get_upper(adjust) - gtk_adjustment_get_page_size(adjust);
new = info->count ? (max * info->count / 100) : gtk_adjustment_get_upper(adjust);
+ /* save the position to mark ' */
+ vb.state.marks[VB_MARK_TICK] = gtk_adjustment_get_value(adjust);
break;
case '0':
adjust = vb.gui.adjust_h;