about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--xxxterm.c54
1 files changed, 4 insertions, 50 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 43c2315..b845a7e 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -5080,52 +5080,6 @@ gototab(struct tab *t, struct karg *args)
 }
 
 int
-gotonexttab(struct tab *t, struct karg *args)
-{
-	int			count, n_tabs, dest;
-	struct karg 		arg = {0, NULL, -1};
-
-	count = atoi(args->s);
-	if (count == 0)
-		count = 1;
-
-	arg.i = XT_TAB_NEXT;
-
-	n_tabs = gtk_notebook_get_n_pages(notebook);
-	dest = gtk_notebook_get_current_page(notebook);
-
-	dest += (count + 1) % n_tabs;
-	if (dest > n_tabs)
-		dest -= n_tabs;
-	arg.precount = dest;
-
-	DNPRINTF(XT_D_BUFFERCMD, "gotonexttab: count: %d - dest : %d \n", count, dest);
-
-	movetab(t, &arg);
-
-	return (0);
-}
-
-int
-gotoprevtab(struct tab *t, struct karg *args)
-{
-	int		count;
-	struct 		karg arg = {0, NULL, -1};
-
-	count = atoi(args->s);
-	if (count == 0)
-		count = 1;
-
-	arg.i = XT_TAB_PREV;
-	arg.precount = count;
-
-	DNPRINTF(XT_D_BUFFERCMD, "gotoprevtab: count: %d\n", count);
-	movetab(t, &arg);
-
-	return (0);
-}
-
-int
 zoom_amount(struct tab *t, struct karg *arg)
 {
 	struct karg	narg = {0, NULL, -1};
@@ -5180,10 +5134,10 @@ struct buffercmd {
 	{ "^m[a-zA-Z0-9]$",	XT_PRE_NO,	"m",	mark,		XT_MARK_SET },
 	{ "^['][a-zA-Z0-9]$",	XT_PRE_NO,	"'",	mark,		XT_MARK_GOTO },
 	{ "^[0-9]+t$",		XT_PRE_YES,	"t",	gototab,	0 },
-	{ "^g0$",		XT_PRE_YES,	"g0",	gototab,	XT_TAB_FIRST },
-	{ "^g[$]$",		XT_PRE_YES,	"g$",	gototab,	XT_TAB_LAST },
-	{ "^[0-9]*gt$",		XT_PRE_YES,	"t",	gotonexttab,	0 },
-	{ "^[0-9]*gT$",		XT_PRE_YES,	"T",	gotoprevtab,	0 },
+	{ "^g0$",		XT_PRE_YES,	"g0",	movetab,	XT_TAB_FIRST },
+	{ "^g[$]$",		XT_PRE_YES,	"g$",	movetab,	XT_TAB_LAST },
+	{ "^[0-9]*gt$",		XT_PRE_YES,	"t",	movetab,	XT_TAB_NEXT },
+	{ "^[0-9]*gT$",		XT_PRE_YES,	"T",	movetab,	XT_TAB_PREV },
 	{ "^M[a-zA-Z0-9]$",	XT_PRE_NO,	"M",	qmark,		XT_QMARK_SET },
 	{ "^go[a-zA-Z0-9]$",	XT_PRE_NO,	"go",	qmark,		XT_QMARK_OPEN },
 	{ "^gn[a-zA-Z0-9]$",	XT_PRE_NO,	"gn",	qmark,		XT_QMARK_TAB },